自学内容网 自学内容网

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

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

git config --global credential.helper store

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

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

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"

原文地址:https://blog.csdn.net/m0_49448331/article/details/142779896

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!