linux下使用git push时免输入账号密码
1.在~下,创建文件 .git-credentials, 用gedit编辑此文件:1
2
3suda@suda-Aspire-4750:~$cd
suda@suda-Aspire-4750:~$touch .git-credentials
suda@suda-Aspire-4750:~$gedit .git-credentials
然后输入:https://{username}:{password}@github.com
例如:https://aoeddklj:1233ds@github.com
2.在终端下执行1
suda@suda-Aspire-4750:~$git config --global credential.helper store
3.查看~/.gitconfig是否会多了一项:1
2[credential]
helper = store
如果存在,就不需要输入密码了
参考:http://weibo.com/p/1001603737697985379267?from=page_100505_profile&wvr=6&mod=wenzhangmod
原文作者: ghbhaha
原文链接: /2015/02/28/linux下使用git-push时免输入账号密码/
版权声明: 转载请注明出处(必须保留作者署名及链接)