首页 > 其他 > 详细

git保存帐号密码

时间:2016-08-30 14:53:41      阅读:113      评论:0      收藏:0      [点我收藏+]

每次更新git都要输入帐号密码比较麻烦,可以通过手动设置配置文件。

window下:

进入home文件夹,一般是C:\Users\Administrator,创建.git-credentials文件(可以先创建一个git-credentials文件,然后在git bash下使用命令 mv git-credentials .git-credentials),打开文件,输入  http://{用户名}:{密码}@{服务器域名或ip} 保存


在bash下,执行 git config --global credential.helper store


可以看到生成了.git-config文件,里面内容为

[credential]

    helper = store


同样,在linux下,在个人根目录下执行同样的操作即可。

git保存帐号密码

原文:http://pdoctor.blog.51cto.com/2125522/1844239

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!