服務器上每次執行git pull,都提示輸入用戶名和密碼


1.執行命令:

git config --global credential.helper store

這個時候~/.gitconfig文件中會多一行

[credential]
helper = store

2.再次執行git pull 輸入賬號密碼

此時你會看到/root/.git-credentials中會多一行內容。里面的內容類似https://{username}:{password}@github.com這種形式

或者是

[credential]
helper = store
[user]
email = XXXXX@qq.com
name =  yourname

形式

 

3.以后git pull 就不用輸入密碼了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM