开发者社区 问答 正文

设置让 TortoiseGit + msysgit 记住帐号密码:报错

使用git的公共仓库,但每次提交都要求填写帐号密码,有点麻烦,下面的方法可以让git“记住密码”

==================================================================

在"C:\Documents and Settings\Administrator\.gitconfig" 文件 或 "项目/.git/config"文件 里增加两行:

[credential]    
    helper = store

或者具体某项目记住账号/密码:进入修改“项目/.git/config”,增加

[credential]    
    helper = store

设置完毕!

下次git操作提示输入帐号密码后就会自动往了,帐号密码信息会保存在 C:\Documents and Settings\Administrator\.git-credentials里,如下效果:

https://username:987654321@git.oschina.net  
https://myusername:123456789@other.com

安全性嘛,自己看着办。

展开
收起
kun坤 2020-06-06 14:17:38 532 分享 版权
1 条回答
写回答
取消 提交回答