-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Windows 10, Java 11
Jenkins 2.452.1
Git plugin 5.2.2 (was 5.2.0)
Plugin changes which (I think) might also be relevant:
SSH credentials 337 (was 308)
Git client plugin 4.7.0 (was 4.5.0)
Mina SSHD API 2.12.1 (was 2.10.0)
Bitbucket branch source 886 (was 848)
Repo is on bitbucket cloud
Project is multibranch pipeline with JenkinsfileWindows 10, Java 11 Jenkins 2.452.1 Git plugin 5.2.2 (was 5.2.0) Plugin changes which (I think) might also be relevant: SSH credentials 337 (was 308) Git client plugin 4.7.0 (was 4.5.0) Mina SSHD API 2.12.1 (was 2.10.0) Bitbucket branch source 886 (was 848) Repo is on bitbucket cloud Project is multibranch pipeline with Jenkinsfile
After a plugin upgrade, the GIT_URL env variable seems to include the user name configured in the used Jenkins credential for the repo.
I'm doing some command line git stuff in a script step like this:
withCredentials([usernameColonPassword(credentialsId: 'bitbucketuser', variable: 'USERPASS')]) { script { stdout = bat(returnStdout: true, script: "@git.exe push https://${USERPASS}@${env.GIT_URL.split('://')[1]} --tags") } // script } // withCredentials
Before the plugin changes, this worked fine, but after, the url git tries to push to, contains two @ characters.
Pipeline step from build done before the plugin change: @git.exe push https://${USERPASS}@bitbucket.org/Organization/repo.git --tags
Pipeline step from (failing) build done after the plugin change: @git.exe push https://${USERPASS}@johndoe@bitbucket.org/organization/repo.git --tags
- is duplicated by
-
JENKINS-73796 GitSCM contains 'username@' in the URL
- Open