//生成一个.gitconfig文件,里面记录我们的账号和密码
git config --global credential.helper store
git config --global user.username "username"
git config --global user.password "password"

//可以自定义存放密码的文件路径(~/.git-credentials)
git config --global credential.helper store --file ~/.git-credentials

最后执行git pull拉取代码后,输入用户名和密码后,会将用户名和密码以明文的形式存储在~/.git-credentials文件中,
以后再执行git pull的时候就不需要再输入密码了!!
Logo

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

更多推荐