File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
pipeline-examples/push-git-repo Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 55
66// credentialsId here is the credentials you have set up in Jenkins for pushing
77// to that repository using username and password.
8- withCredentials([usernamePassword(credentialsId : ' MyID ' , passwordVariable : ' GIT_PASSWORD' , usernameVariable : ' GIT_USERNAME' )]) {
8+ withCredentials([usernamePassword(credentialsId : ' git-pass-credentials-ID ' , passwordVariable : ' GIT_PASSWORD' , usernameVariable : ' GIT_USERNAME' )]) {
99 sh(" git tag -a some_tag -m 'Jenkins'" )
1010 sh(' git push https://${GIT_USERNAME}:${GIT_PASSWORD}@<REPO> --tags' )
1111}
1212
1313// For SSH private key authentication, try the sshagent step from the SSH Agent plugin.
14- sshagent (credentials : [' git-credentials' ]) {
14+ sshagent (credentials : [' git-ssh- credentials-ID ' ]) {
1515 sh(" git tag -a some_tag -m 'Jenkins'" )
1616 sh(' git push <REPO> --tags' )
1717}
You can’t perform that action at this time.
0 commit comments