checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'git']], submoduleCfg: [], userRemoteConfigs: [[url: 'http://my-GITBUCKET-gitURL.git']]])
dir ('git') {
withCredentials([usernamePassword(credentialsId: '11111111-1111-11111-11111-111111122222', usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD')]) { sh "git credential approve" sh 'git tag -a ' + env.BUILD_ID + ' -m "Creating tag"' sh "git push origin " + env.BUILD_ID }}09:45:12 [git] Running shell script09:45:13 + git push origin 12409:45:13 fatal: could not read Username for 'http://my-GITBUCKET-gitURL.git': No such device or addresscheckout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'git']], submoduleCfg: [], userRemoteConfigs: [[url: 'http://my-GITBUCKET-gitURL.git']]])
dir ('git') {
withCredentials([usernamePassword(credentialsId: '11111111-1111-11111-11111-111111122222', usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD')]) { sh "git credential approve" sh 'git tag -a ' + env.BUILD_ID + ' -m "Creating tag"' sh "git push http://${GIT_USERNAME}:${GIT_PASSWORD}@${repoURL.substring(7)} --tags" }}