服务器上每次执行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