git config --global credential.helper store git pull / git push (第一次输入,后续就不用再次输入)
这个命令其实是在主目录的gitconfig目录下添加了以下内容(~/.gitconfig)
[credential] helper = store
输入一次密码之后,git就会自动帮你记住用户名和密码。