mac下git push避免每次都输入用户名和密码的配置

参考链接:http://www.linuxdiyf.com/linux/18389.html

链接2:https://git-scm.com/book/zh/v2/Git-%E5%B7%A5%E5%85%B7-%E5%87%AD%E8%AF%81%E5%AD%98%E5%82%A8#_credential_caching

我选择的是明文存放在磁盘中,不过期的

1.创建并且写入.git-credentials文件,vim编辑他,写入下面一条

2.比如用户名为tom,密码为tompassword,就这样写

https://tom:tompassword@github.com

3.保存后在终端下执行  git config --global credential.helper store

这样就可以了

posted @ 2017-01-19 15:49  杰杰顺利  阅读(7459)  评论(0编辑  收藏  举报