Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57936

Parameters not expanded in username or password portion of https git URL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-client-plugin
    • 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.

            unrue Gabriele Fatigati
            unrue Gabriele Fatigati
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: