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

1、配置用户名邮箱

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

2、查找.gitconfig文件位置

find / -name .gitconfig

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

[credential]
        helper = store

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

git config --global credential.helper store

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

posted @ 2020-12-01 17:19  人艰不拆_zmc  阅读(771)  评论(0编辑  收藏  举报