您的位置:首页 > 其它

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

2017-01-19 15:49 555 查看
参考链接: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

这样就可以了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: