使用git的公共仓库,但每次提交都要求填写帐号密码,有点麻烦,下面的方法可以让git“记住密码”
在"C:\Documents and Settings\Administrator\.gitconfig" 文件 或 "项目/.git/config"文件 里增加两行:
1
2
|
[credential]
helper = store
|
或者具体某项目记住账号/密码:进入修改“项目/.git/config”,增加
1
2
|
[credential]
helper = store
|
设置完毕!
下次git操作提示输入帐号密码后就会自动往了,帐号密码信息会保存在 C:\Documents and Settings\Administrator\.git-credentials里,如下效果:
1
2
|
https:
//username
:987654321@git.oschina.net
https:
//myusername
:123456789@other.com
|
安全性嘛,自己看着办。