避免每次push都输入密码

Posted wujianqinjian

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了避免每次push都输入密码相关的知识,希望对你有一定的参考价值。

gitbash每次提交都要输密码真有点头疼,所以就:

1 创建验证文件:touch  .git-credentials(windows)

2 编辑验证文件:vim  .git-credentials

  文件内容:https://{github_username}:{passwd}@github.com

3  wq 保存

4  设置为全局配置:git  config  --global credential.helper store

5  重启git_bash,提交新内容,输入一次用户名密码后就不用再输入了

 

以上是关于避免每次push都输入密码的主要内容,如果未能解决你的问题,请参考以下文章