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

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

    • 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.

          [JENKINS-57936] Parameters not expanded in username or password portion of https git URL

          Gabriele Fatigati created issue -
          Gabriele Fatigati made changes -
          Environment Original: Jenkins 2.164.3 New: Jenkins 2.164.3 git plugin 3.10.0
          Gabriele Fatigati made changes -
          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
          Mark Waite made changes -
          Summary Original: Git plugin password bug New: Parameters not expanded in username or password portion of https git URL
          Mark Waite made changes -
          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 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.
          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 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.
          Mark Waite made changes -
          Component/s New: git-client-plugin [ 17423 ]
          Component/s Original: git-plugin [ 15543 ]
          Mark Waite made changes -
          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 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.
          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 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.
          Mark Waite made changes -

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

              Created:
              Updated: