我是mac测试好的
1.在~/下, touch创建文件 .git-credentials, 用vim编辑此文件,输入:
$ cd ~/
$ vim .git-credentials
https://{username}:{password}@github.com`
注意去掉{}
2.在终端下执行
$ git config --global credential.helper store
3.可以看到~/.gitconfig文件,会多了一项:
$ cat ~/.gitconfig
[credential]
helper = store
网友评论