在 git bash 里输入命令:

git config --global credential.helper store

然后执行 git 操作,输入一遍密码后就会记录密码,以后就不用输入了。

那么要更改记录的用户名和密码怎么办呢?

因为上面的命令会在你的用户目录下新建个 .git-credentials 文件,我们只需要更改这个文件即可。

找到自己的用户目录 .git-credentials文件。

Git 怎么避免每次都要输入密码

编辑文件,替换你的 username 和 password

https://username:[email protected]

Git 怎么避免每次都要输入密码

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-14
  • 2022-12-23
  • 2022-01-07
  • 2021-09-02
  • 2022-12-23
  • 2021-08-24
相关资源
相似解决方案