1、配置用户名邮箱

1
2
git config --global user.name "用户名"
git config --global user.email "邮箱"

2、查找.gitconfig文件位置

1
find / -name .gitconfig

中间件-git-centos7解决git每次都要输入账号密码的问题

3、打开.gitconfig文件
4、加入下面的代码

1
2
[credential]
        helper = store

5、切换到项目根目录,执行下面命令

1
git config --global credential.helper store

6、按平常git命令执行pull或者push,输入账号密码,第一次需要,往后就不需要了

相关文章:

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