开发者社区> 问答> 正文

设置让 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 475 0
1 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载

相关实验场景

更多