Git免登录,不需重复输入账号和密码

2015/04/17 09:49
阅读数 5.4W

linux下

在~/下, touch创建文件 .git-credentials:
touch .git-credentials

# 用vim编辑此文件,
vim .git-credentials

#输入内容格式
https://username:password@github.com

2. 在终端下执行 

git config --global credential.helper store

 

 

可以看到~/.gitconfig文件,会多了一项:
[credential]
    helper = store

更多:

windows下: http://www.cnblogs.com/ballwql/p/3462104.html

注意:

如果换了新的github账号,一定记得修改~/git-credentials里面的内容。

否则会出现没有权限的错误提示,无法push。

 

 

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
0 评论
3 收藏
2
分享
返回顶部
顶部