Linux之解决每次git pull/git push都需输入密码设置

操作命令:

//执行这两条命令
cd / git config --global credential.helper store

执行完命令之后会在.gitconfig文件中多加红色字体

[user]
        name = your name
        email = your email
[credential]
        helper = store

使用:

  cd到项目目录,执行git pull,会提示输入账号密码。输完这一次以后git pull或git push就不在需要输入密码了(会在根目录生成一个 .git-credentials 文件)

posted @ 2022-03-23 10:11  石三爷  阅读(481)  评论(0编辑  收藏  举报