• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • bitbucket-branch-source:871.v28d74e8b_4226

      Since version 871.v28d74e8b_4226, the GitSCM built by SCMSource (Multibranch Pipeline job) contains a URL with the username added to it:

      [Pipeline] checkout
      The recommended git tool is: NONE
      using credential temp
       > git rev-parse --resolve-git-dir /tmp/je-1-home/workspace/test_master/.git # timeout=10
      Fetching changes from the remote Git repository
       > git config remote.origin.url https://myuser@my.bitbucket.local/myuser/myrepo.git # timeout=10
      [...]
      

      It is also included in GIT_URL injected environment variable.

          [JENKINS-73796] GitSCM contains 'username@' in the URL

          Allan BURDAJEWICZ added a comment - Introduced by https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/796/files#diff-48bba73fb7b2d4a37251304c00f739c4bc5c59be2c25139c198b97ed0d2adcfe . But seems un-necessary. At least in most cases.

          Mark Waite added a comment -

          I wonder if this is related to a similar report to the git plugin that I was unable to duplicate.

          Refer to JENKINS-73250 for that report.

          Mark Waite added a comment - I wonder if this is related to a similar report to the git plugin that I was unable to duplicate. Refer to JENKINS-73250 for that report.

          markewaite most likely. The GIT_URL is derived from the userRemoteConfig of GitSCM: https://github.com/jenkinsci/git-plugin/blob/ca0612ea4b08eab8be9a7306fc4972a1ffd48200/src/main/java/hudson/plugins/git/GitSCM.java#L1585. So what[who]ever configure the GitSCM is to blame.

          Allan BURDAJEWICZ added a comment - markewaite most likely. The GIT_URL is derived from the userRemoteConfig of GitSCM: https://github.com/jenkinsci/git-plugin/blob/ca0612ea4b08eab8be9a7306fc4972a1ffd48200/src/main/java/hudson/plugins/git/GitSCM.java#L1585 . So what [who] ever configure the GitSCM is to blame.

          Nikolas Falco added a comment - - edited

          the same here, for us this cause failure using sshagent credential step using git command by scripted pipeline

          + git push origin HEAD:master
          fatal: could not read Password for 'https://acme@bitbucket.org': No such device or address
          [Pipeline] }
          Executing sh script inside container main of pod devops-os-devops-polcity-mobile-chart-master-8-qk5r3-pqz3-vqfpc
          Executing command: "ssh-agent" "-k" 
          

          My mistake, ssh trait was not configured

          Nikolas Falco added a comment - - edited the same here, for us this cause failure using sshagent credential step using git command by scripted pipeline + git push origin HEAD:master fatal: could not read Password for 'https: //acme@bitbucket.org' : No such device or address [Pipeline] } Executing sh script inside container main of pod devops-os-devops-polcity-mobile-chart-master-8-qk5r3-pqz3-vqfpc Executing command: "ssh-agent" "-k" My mistake, ssh trait was not configured

            Unassigned Unassigned
            allan_burdajewicz Allan BURDAJEWICZ
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: