git push每次都要身份验证,如何解决?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git push每次都要身份验证,如何解决?相关的知识,希望对你有一定的参考价值。

参考技术A git push 或者pull的时候,每次都要输入用户名和密码的解决方法
git config --global credential.helper store

避免每次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,提交新内容,输入一次用户名密码后就不用再输入了

 

以上是关于git push每次都要身份验证,如何解决?的主要内容,如果未能解决你的问题,请参考以下文章