一、配置帐户:
git config --global user.name "Your Name"
git config --global user.email "email@example.com"
git config --list
二、查找.gitconfig
find / -name .gitconfig
三、编辑.gitconfig
vim /root/.gitconfig
添加如下内容:
[credential]
helper = store
四、切换到项目根目录,执行下面命令
git config --global credential.helper store
按平常git命令执行pull或者push,输入账号密码,第一次需要,往后就不需要了