美文网首页
十二、terminal git命令每次需要账号密码

十二、terminal git命令每次需要账号密码

作者: 緦菍亭芷 | 来源:发表于2020-10-10 13:55 被阅读0次

转载

我是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

相关文章

网友评论

      本文标题:十二、terminal git命令每次需要账号密码

      本文链接:https://www.haomeiwen.com/subject/aqzdpktx.html