Git提交记住用户名和密码
每次提交代码都要输入用户名密码,十分麻烦,如何让Git记住密码。
Https记住密码
永久记住密码
git config --global credential.helper store
如果没有--global,则在当前项目下的.git/config文件中添加。
当然,你也可以直接复制上面生成的配置到配置文件中。
临时记住密码
默认记住15分钟:
git config –global credential.helper cache
下面是自定义配置记住1小时:
git config credential.helper ‘cache –timeout=3600’