服务器上每次执行git pull,都提示输入用户名和密码

转自:  https://www.cnblogs.com/winyh/p/12908504.html

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 就不用输入密码了

原文地址:https://www.cnblogs.com/maidongdong/p/13891161.html