git-resource
git-resource copied to clipboard
Escaped character in password string ends up in the .netrc file.
As reported in concourse/semver-resource#80 I was getting this error:
resource script '/opt/resource/check []' failed: exit status 1
stderr:
Cloning into '/tmp/semver-git-repo'...
fatal: could not read Username for 'https://bengtssondd.it': No such device or address
error checking for new versions: exit status 128`
I did various things but I ended up finding out that it is because of a special character in the git users password. I had made sure to escape this special character. However, the \ character had not been removed from the incoming string by fly or some other component in ConcourseCI when executing set-pipeline. This meant that \ was included on the password string in the .netrc file in the worker container for semver.
Changing the password, so that it did not require escaping alleviated the issue. However, I think that it is a bug that special characters like ! is not supported via escaping. Especially when it works sometimes. As I was able to successfully setup a pipeline on another Macbook where the same git user was used with a ! in the password (as the leading character). Both the working system and the non-working system was running v.4.2.1 of ConcourseCI.
It had previously worked on ConcourseCI v3.10 on the Macbook where it no longer worked.
Thank you.
Any news on this?
@larssb Sorry for the radio silence. We're spread pretty thin and don't have a whole lot of bandwidth for maintaining resources at the moment, so we tend to encourage external contributions for feature requests and bug fixes for corner cases. If you have time to submit a pull request for this it would likely get the job done faster than hoping we get to it. 🙂 Happy to review if so!