-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.164.3 git plugin 3.10.0 git-client 2.7.7
When a parameterized job attempts to use the value of the parameter as the username or password of an https based git repository URL, the git client plugin does not expand the parameter reference. If a string parameter USERNAME and a password parameter PASSWORD are defined in either a Freestyle or a Pipeline job, references to those variables are not expanded in the username and password portion of the repository URL.
https://${USERNAME}:${PASSWORD}@github.com/${USERNAME}/secret-repo.git
becomes:
https://${USERNAME}:${PASSWORD}@github.com/MarkEWaite/secret-repo.git
Notice that the USERNAME parameter is replaced in some parts of the URL, but not in all parts of the URL.
Dear Jenkins users,
I'm use Jenkins 2.164.3 and trying to clone a repository with Git Plugin I get the error " authentication failed", because for some reason git plugin add "%24" in front of my password read from password parameter.
I read from ticket JENKINS-20533
It was an old bug of 5 years ago of very old git plugin, but now should be solved!
Could you help me? Thanks.
[JENKINS-57936] Parameters not expanded in username or password portion of https git URL
Environment | Original: Jenkins 2.164.3 | New: Jenkins 2.164.3 git plugin 3.10.0 |
Environment | Original: Jenkins 2.164.3 git plugin 3.10.0 | New: Jenkins 2.164.3 git plugin 3.10.0 git-client 2.7.7 |
Summary | Original: Git plugin password bug | New: Parameters not expanded in username or password portion of https git URL |
Description |
Original:
Dear Jenkins users, I'm use Jenkins 2.164.3 and trying to clone a repository with Git Plugin I get the error " authentication failed", because for some reason git plugin add "%24" in front of my password read from password parameter. I read from ticket It was an old bug of 5 years ago of very old git plugin, but now should be solved! Could you help me? Thanks. |
New:
When a parameterized job attempts to use the value of the parameter as the username or password of an https based git repository URL, the git client plugin Dear Jenkins users, I'm use Jenkins 2.164.3 and trying to clone a repository with Git Plugin I get the error " authentication failed", because for some reason git plugin add "%24" in front of my password read from password parameter. I read from ticket It was an old bug of 5 years ago of very old git plugin, but now should be solved! Could you help me? Thanks. |
Component/s | New: git-client-plugin [ 17423 ] | |
Component/s | Original: git-plugin [ 15543 ] |
Description |
Original:
When a parameterized job attempts to use the value of the parameter as the username or password of an https based git repository URL, the git client plugin Dear Jenkins users, I'm use Jenkins 2.164.3 and trying to clone a repository with Git Plugin I get the error " authentication failed", because for some reason git plugin add "%24" in front of my password read from password parameter. I read from ticket It was an old bug of 5 years ago of very old git plugin, but now should be solved! Could you help me? Thanks. |
New:
When a parameterized job attempts to use the value of the parameter as the username or password of an https based git repository URL, the git client plugin does not expand the parameter reference. If a string parameter {{USERNAME}} and a password parameter {{PASSWORD}} are defined in either a Freestyle or a Pipeline job, references to those variables are not expanded in the username and password portion of the repository URL. {noformat} https://${USERNAME}:${PASSWORD}@github.com/${USERNAME}/secret-repo.git {noformat} becomes: {noformat} https://${USERNAME}:${PASSWORD}@github.com/MarkEWaite/secret-repo.git {noformat} Notice that the USERNAME parameter is replaced in some parts of the URL, but not in all parts of the URL. ---- Dear Jenkins users, I'm use Jenkins 2.164.3 and trying to clone a repository with Git Plugin I get the error " authentication failed", because for some reason git plugin add "%24" in front of my password read from password parameter. I read from ticket It was an old bug of 5 years ago of very old git plugin, but now should be solved! Could you help me? Thanks. |
unrue please provide a numbered series of steps which will duplicate the problem you are seeing. As an example of the steps that I use to test various authentication schemes with the Jenkins git plugin, I use:
You say that
How can you see that Jenkins is adding "%24" to the front of your password? Are you cloning without using the git plugin? Does your password start with the character '$' (which might be HTML escaped to '%24')?
Are you cloning an authenticated repository by embedding the username and password into the URL instead of using a credential? If so, does it work any better if you use a Jenkins credential instead of embedding the username and password in the repository URL?