Skip to content

git配置config记住密码

设置记住密码(默认15分钟):

git config –global credential.helper cache 如果想自己设置时间,可以这样做:

git config credential.helper ‘cache –timeout=3600’ 这样就设置一个小时之后失效

长期存储密码:

git config –global credential.helper store 增加远程地址的时候带上密码也是可以的。(推荐)

从仓库的config的里面修改url,后面加上密码

http://yourname:password@git.oschina.net/name/project.git 补充:使用客户端也可以存储密码的。