设置全局仓库的用户名密码

git config --global user.name "userName"  //你的用户名
git config --global user.email "email address" //你的邮箱地址
git config --list   //查看git设置情况

git记住用户名以及密码

git config --global credential.helper store

以上是全局,会在用户的主目录生成.gitconfig文件

cat .gitconfig 
[user]
        name = deploy@123.com
[credential]
        helper = store

之后在主目录,操作git pull,会提示输入账号密码,需要输一次后面不需要在输

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐