linux / mac / msys2
touch .git-credentials
vim .git-credentials
https://你的用户名:你的密码@github.com
在终端下输入:
git config --global credential.helper store
打开~/.gitconfig文件,会发现多了一项:
[credential]
helper = store
Windows方法:
echo https://你的用户名:你的密码@github.com >系统盘符:\Users\登录名\.git-credentials
不知道的可以尝试
echo https://你的用户名:你的密码@github.com >%USERPROFILE%\.git-credentials
在终端下输入:
git config --global credential.helper store
打开~/.gitconfig文件,会发现多了一项:
[credential]
helper = store
完成