IOS

Git Push 避免用户名和密码方法

2016-10-08  本文已影响41人  大明白

1. 创建文件存储GIT用户名和密码
home目录中,添加.git-credentials:

cd ~
vim .git-credentials
    https://{username}:{password}@github.com

2. 添加Git Config 内容
输入如下命令:

git config --global credential.helper store

执行完后查看.gitconfig文件,会多了一项:

[credential] 
    helper = store

git push时就不用再输入用户名和密码

上一篇 下一篇

猜你喜欢

热点阅读