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

# 解决git pull/push每次都需要输入密码问题

git bash进入你的项目目录,输入:

bash 复制代码
git config --global credential.helper store

然后你会在你本地生成一个文本,上边记录你的账号和密码。配置项写入到 "C:\Users\用户名\ .gitconfig" 文件中。

然后你使用上述的命令配置好之后,再操作一次git pull,然后它会提示你输入账号密码,这一次之后就不需要再次输入密码了。

此外,相关操作
git config credential.helper 记住保存账号密码、关闭取消密码自动存储

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

bash 复制代码
git config --global --unset credential.helper

查询 凭证存储模式

bash 复制代码
git config --global credential.helper
或
git config --global --list
或
git config --global -l

修改 配置文件

bash 复制代码
git config --file=~/.git_credentails --global credential.helper "store"
或
git config --global  user.name "store"
相关推荐
无限进步_3 小时前
203. 移除链表元素 - 题解与详细分析
c语言·开发语言·数据结构·git·链表·github·visual studio
测试_AI_一辰3 小时前
Agent & RAG 测试工程 02:RAG 从最小闭环到可信
开发语言·前端·人工智能·github·ai编程
iwanghang3 小时前
Windows下AndroidStudio4.0.0使用GitHub管理版本,以及如何改成码云Gitee
windows·github
CoderJia程序员甲12 小时前
GitHub 热榜项目 - 日榜(2026-01-26)
ai·开源·大模型·github·ai教程
轻抚酸~14 小时前
使用git维护github项目的简单实践
git·github
前端 贾公子17 小时前
Git优雅使用:git tag操作
javascript·github
康康的AI博客1 天前
用Claude Code构建企业级GitHub CI/CD安全自动化流程
安全·ci/cd·github
前端 贾公子1 天前
npm 发包配置双重身份验证
前端·javascript·微信小程序·小程序·github
前端 贾公子1 天前
如何在GitHub上添加Release
github
老兵发新帖1 天前
Label Studio 生态集成
github