We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
permission denied
Step01 我们在本地仓库能够正常的从远端仓库pull文件到本地仓库,但是我们从本地push问价难道远程仓库的时候报 ! [remote rejected] master -> master (permission denied) 详细错误如下图所示:
Step01
! [remote rejected] master -> master (permission denied)
可以搜索相关的git凭证缓存博客文章了解; 【参考博文】https://blog.csdn.net/qq_41311259/article/details/81255315 【参考博文】https://www.cnblogs.com/volnet/p/git-credentials.html
git凭证缓存
Step02 这是应该git配置文件里面已经缓存了上一个仓库的账户和密码,这样他会从目录 ·C:\Users\86136下搜索 配置文件 .gitconfig,一般这个账户密码缓存在 .git-credentials中;因此我们需要清空以前的缓存凭证。那么我们先使用命令 git config --list命令查看配置里面是否配置了credential.helper这一项,于是我在我的系统里面查到了:
Step02
C:\Users\86136
.git-credentials
git config --list
credential.helper
Step03 那么我们需要将credential.helper配置项删除掉,我们需要删除系统级(system)、全局级(--global)、用户级(--local)三个清空下的配置项;使用如下命令: git config --system(--global/--local) --unset credential.helper
Step03
git config --system(--global/--local) --unset credential.helper
Step04 删除掉credential.helper配置项之后,我们再使用 git push命令的时候就找不到缓存的账户和密码了,这个时候系统就会提示我们输入github的账户和密码,输入完毕之后就可以正常的push文件到远程仓库了。
Step04
git push
The text was updated successfully, but these errors were encountered:
如果使用git config --local --unset credential.helper命令对credential.help命令进行删除时报warning: credential.helper has multiple values错误,会导致无法删除配置项,入下图所示。
git config --local --unset credential.helper
credential.help
warning: credential.helper has multiple values
此时我们应该先将这些需要删除的项合并成一个,使用命令git config --local --replace-all credential.helper "store" 将所有的credential.helper的值替换为store`,如下图所示:
git config --local --replace-all credential.helper "store" 将所有的
的值替换为
然后我们在执行git config --local --unset credential.helper命令时,就会发现已经删除了credential.helper配置项
`
Sorry, something went wrong.
No branches or pull requests
1、git push 报
permission denied
Step01
我们在本地仓库能够正常的从远端仓库pull文件到本地仓库,但是我们从本地push问价难道远程仓库的时候报! [remote rejected] master -> master (permission denied)
详细错误如下图所示:可以搜索相关的
git凭证缓存
博客文章了解;【参考博文】https://blog.csdn.net/qq_41311259/article/details/81255315
【参考博文】https://www.cnblogs.com/volnet/p/git-credentials.html
Step02
这是应该git配置文件里面已经缓存了上一个仓库的账户和密码,这样他会从目录 ·C:\Users\86136
下搜索 配置文件 .gitconfig,一般这个账户密码缓存在.git-credentials
中;因此我们需要清空以前的缓存凭证。那么我们先使用命令git config --list
命令查看配置里面是否配置了credential.helper
这一项,于是我在我的系统里面查到了:Step03
那么我们需要将credential.helper
配置项删除掉,我们需要删除系统级(system)、全局级(--global)、用户级(--local)三个清空下的配置项;使用如下命令:git config --system(--global/--local) --unset credential.helper
Step04
删除掉credential.helper
配置项之后,我们再使用git push
命令的时候就找不到缓存的账户和密码了,这个时候系统就会提示我们输入github的账户和密码,输入完毕之后就可以正常的push文件到远程仓库了。The text was updated successfully, but these errors were encountered: