Git免密码pull&push

  Windows下Git在使用http方式的时候clone,pull,push需要输入用户名及密码,通过以下设置可以免密码

  在用户文件夹创建文件.git-credentials内容如下

https://{用户名}:{密码}@github.com

  在git bash终端执行命令

git config --global credential.helper store

  在用户文件夹下面的文件.gitconfig会生成以下内容

   执行一次git pull或者git push输入一次密码即可在下次免密

  PS:在linux下同样有效,在linux下只需要在终端执行一下命令git config --global credential.helper store然后在执行git pull一次即可

原文地址:https://www.cnblogs.com/minseo/p/9055363.html