Git:git pull每次都要求输入用户名和密码

简介: Git:git pull每次都要求输入用户名和密码

git pull 每次都要求输入用户名和密码


全局配置

git config --global credential.helper store

或者局部配置


git config credential.helper store

查看git配置


git config --list

如果有多个账号,可能会出现403报错

这时看下文件,如果有多个账号,可以尝试删除


rm ~/.git-credentials

解决办法

修改项目目录下的配置文件


$ vim ./.git/config
[remote "origin"]
url = https://<username>:<password>@e.coding.net/project/demo.git
$ more ~/.git-credentials
https://<username>:<password>@e.coding.net

相关文章
|
1月前
|
开发工具 数据安全/隐私保护 git
Git切换本地用户名,IDEA集成Git如何切换本地用户名
Git切换本地用户名,IDEA集成Git如何切换本地用户名
56 3
|
1月前
|
开发工具 git 开发者
Git Pull vs. Git Fetch:深度解析
【2月更文挑战第29天】
728 0
Git Pull vs. Git Fetch:深度解析
|
1月前
|
开发工具 git 开发者
|
14天前
|
存储 开发工具 git
解决“hint: the same ref. If you want to integrate the remote changes, usehint: ‘git pull‘ before pus”
解决“hint: the same ref. If you want to integrate the remote changes, usehint: ‘git pull‘ before pus”
|
20天前
|
缓存 开发工具 数据安全/隐私保护
mac git命令行操作 git push pull 逻辑
mac git命令行操作 git push pull 逻辑
13 1
|
1月前
|
开发工具 git
git pull之后出现REBASE(1/1)
git pull之后出现REBASE(1/1)
33 3
|
1月前
|
开发工具 数据安全/隐私保护 C++
vs2019中同步到github上的用户名错误_控制面板和vs的git全局设置重新登录
vs2019中同步到github上的用户名错误_控制面板和vs的git全局设置重新登录
23 0
|
1月前
|
存储 网络安全 数据处理
git远程操作,推送【push】,拉取【pull】,忽略特殊文件,配置别名,标签管理
git远程操作,推送【push】,拉取【pull】,忽略特殊文件,配置别名,标签管理
|
1月前
|
开发工具 git
git 如何为不同的项目设置不同的用户名和邮箱,用来区分个人仓库和公司仓库
git 如何为不同的项目设置不同的用户名和邮箱,用来区分个人仓库和公司仓库
77 0
|
开发工具 数据安全/隐私保护 git
git密码忘记
git密码忘记
471 0