解决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"
相关推荐
Debug的新时代农民工14 小时前
git 冲突
github
瞎掰14 小时前
我开源了一个 Web 扫描器,在 Metasploitable 2 上发现了 83 个漏洞
github
dhjabc_116 小时前
从0到1打造一个GitHub优质资源管理器(一个完整的PyQt6桌面项目实战日记)
github
runafterhit20 小时前
开源知识库GitHub使用经验总结
开源·github
Yunzenn21 小时前
深度解析字节前沿研究-Cola DLM第 04 章:Cola DLM 架构全景 —— 三层解耦的设计哲学
java·linux·python·深度学习·面试·github·transformer
阿里嘎多学长1 天前
2026-05-21 GitHub 热点项目精选
开发语言·程序员·github·代码托管
杖雍皓1 天前
编程范式的下一次跃迁:深度解析全新的 GitHub Copilot 独立桌面应用
github·copilot
JiaWen技术圈2 天前
GitOps 最佳实践:ArgoCD + GitHub Actions 完整落地
github·argocd
王二麻子6662 天前
Ctrl+V 粘贴截图,Claude Code + DeepSeek 直接烂对话?这个开源项目把坑填了
github