withCredentials([usernamePassword(credentialsId: 'fixed',
usernameVariable: 'username',
passwordVariable: 'password')]){
sh("git push http://$username:$password@git.corp.mycompany.com/repo")
}

更多推荐