Git免登陆,不需重复输入帐号和密码

linux下html

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

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

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

2. 在终端下执行 linux

git config --global credential.helper store

 

 

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

更多:git

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

注意:vim

若是换了新的github帐号,必定记得修改~/git-credentials里面的内容。windows

不然会出现没有权限的错误提示,没法push。spa