frank-link

Windows 上设置避免每次 git push 都需要账号密码

在 C:\Users\your name\ 目录下找到到 .gitconfig 这个文件,使用编辑器打开

[user]
    name = ****
    email = ********.com

文件中增加 [credential]配置

[credential]
    helper = store

配置完成保存退出,在项目文件夹打开git bash,使用git pull再输入一次账号密码。最后一次使用git pull

$ git pull
Already up to date.

ok.

linux 上设置避免每次 git push 都需要账号密码

cd /进入根目录,执行以下命令

git config --global credential.helper store

上述命令目的与windows环境中直接编辑.gitconfig目的相同。

进入项目目录,执行git pull,按windows环境操作完成账号密码的录入即可。

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-09
  • 2021-11-08
  • 2022-01-07
  • 2021-12-09
  • 2022-12-23
  • 2021-08-05
  • 2021-07-31
相关资源
相似解决方案