码迷,mamicode.com
首页 > 其他好文 > 详细

git credentials

时间:2021-05-03 12:01:40      阅读:0      评论:0      收藏:0      [点我收藏+]

标签: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...
    ‘‘‘
}

git credentials

标签:pass   variable   flow   lin   word   rip   name   jenkin   github   

原文地址:https://www.cnblogs.com/i-shu/p/14722996.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!