解决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"
相关推荐
lkbhua莱克瓦2410 小时前
Java基础——常用算法4
java·数据结构·笔记·算法·github·排序算法·快速排序
John Song19 小时前
git多个账号管理
git·github
破烂pan21 小时前
github精选Agent学习repo
llm·github·agent
XU磊2601 天前
Git 实现github仓库管理-删除指定目录下的所有文件并保留目录结构
git·github
逛逛GitHub1 天前
1 天狂揽 4000 多 Star 的 AI 舆情分析开源神器。
github
卡洛斯(编程版1 天前
大仓库推到GitHub大踩坑-Git LFS从安装到使用
git·github
玥轩_5211 天前
Git命令速查手册
大数据·git·elasticsearch·gitee·github·命令速查
吃饺子不吃馅1 天前
⚡️ Zustand 撤销重做利器:Zundo 实现原理深度解析
前端·javascript·github
whysqwhw1 天前
KMP类GSON转字符串工具
github
CoderJia程序员甲1 天前
GitHub 热榜项目 - 日榜(2025-11-06)
ai·开源·大模型·github·ai教程