如何处理git每次提交都输入密码

2025-05-07 22:30:45
推荐回答(1个)
回答1:

如何避免git每次提交都输入密码
vim /home/chinaestone/.git-credentials

输入内容
https://{username}:{password}@github.com

保存退出后执行下面命令
git config --global credential.helper store

执行完后
/home/chinaestone/.gitconfig 会新增一项
helper = store
这是再执行git push/pull的时候就不会在要求你输入密码了