标签:pass variable flow lin word rip name jenkin github
https://stackoverflow.com/questions/38461705/checkout-jenkins-pipeline-git-scm-with-credentials
withCredentials([usernamePassword(credentialsId: ‘<credentials-id>‘, passwordVariable: ‘GIT_PASSWORD‘, usernameVariable: ‘GIT_USERNAME‘)]) {
sh ‘‘‘
printf "machine github.com\nlogin $GIT_USERNAME\n password $GIT_PASSWORD" >> ~/.netrc
// continue script as necessary working with git repo...
‘‘‘
}
标签:pass variable flow lin word rip name jenkin github
原文地址:https://www.cnblogs.com/i-shu/p/14722996.html