解决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"
相关推荐
eastyuxiao5 小时前
如何在不同的机器上运行多个OpenClaw实例?
人工智能·git·架构·github·php
AI成长日志9 小时前
【实用工具教程】AI编程助手趋势全景:从Cursor到GitHub Copilot的实战评测
github·copilot·ai编程
怣疯knight14 小时前
如何在 GitHub 上秒查开源项目的 JDK 版本
java·github
天若有情67314 小时前
Canvas生成艺术|意外诞生的混沌风暴(附完整源码+GitHub部署)
前端·css·html·github·canvas·网页
CoderJia程序员甲14 小时前
GitHub 热榜项目 - 日榜(2026-04-04)
人工智能·ai·大模型·github·ai教程
Geoking.16 小时前
GitHub 多账号生存指南:从 SSH 连接到 GPG 签名全流程
运维·ssh·github
irpywp17 小时前
Boneyard:基于组件映射的骨架屏方案
前端·ui·github
m0_6948455718 小时前
RevelGo搭建教程:类Rails开发体验的Go Web框架
服务器·开发语言·后端·docker·golang·开源·github
张二娃同学18 小时前
GitHub 项目创建与 GitHub Desktop 使用教程
服务器·人工智能·深度学习·yolo·github
沙雕不是雕又菜又爱玩20 小时前
如何将项目上传GitHub
github