解决github每次pull push输入密码问题

# 解决git pull/push每次都需要输入密码问题
git bash进入你的项目目录,输入:

git config --global credential.helper store

然后你会在你本地生成一个文本,上边记录你的账号和密码。配置项写入到 "C:\Users\用户名\ .gitconfig" 文件中。
然后你使用上述的命令配置好之后,再操作一次git pull,然后它会提示你输入账号密码,这一次之后就不需要再次输入密码了。
此外,相关操作
git config credential.helper 记住保存账号密码、关闭取消密码自动存储

以下内容与解决该问题无关,仅供扩展了解

注意运行该命令后,密码使用明文存储在.git-credentials文件中,如果后面不用使用该服务器,记得使用以下方式删除

取消(删除)记录账号和密码

git config --global --unset credential.helper

查询 凭证存储模式

git config --global credential.helper
或
git config --global --list
或
git config --global -l

修改 配置文件

git config --file=~/.git_credentails --global credential.helper "store"git config --global  user.name "store"
参考链接

解决github每次pull push输入密码问题
git config credential.helper 记住保存账号密码、关闭取消密码自动存储

你可能感兴趣的:(github)