问题描述
我正在使用git-scm并尝试推送到存储库.这样做之后,我收到了以下消息:
I am using git-scm and tried to push to a repository. Upon doing so, I was greeted with the following message:
fatal: unable to get credential storage lock: File exists
尽管推送确实成功完成了推送,但我想知道为什么会出现此错误.它仍在执行此操作,以前从未执行过此操作.任何帮助表示赞赏.谢谢!
While the push did end up pushing successfully, I was wondering why this error appeared. It is still doing this, and was not doing this before. Any help is appreciated. Thanks!
推荐答案
我今天遇到了同样的问题.原来,我以某种方式具有credential.helper 的两个配置.使用git config --list
检查您是否有多个 credential.helper ="XXX" .
I had the same issue today. It turned out that I somehow had two configs for credential.helper. Use git config --list
to check whether your have multiple credential.helper="XXX".
就我而言,我在全局配置中有credential.helper = manager,在本地配置中有credential.helper = store.
In my case, I had credential.helper=manager in global config and credential.helper=store in local config.
我删除了 path-to-git-project/.git/config 中的本地文件,并解决了问题.
I removed the local one in path-to-git-project/.git/config and solved the problem.
这篇关于致命:无法获取凭证存储锁:文件存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!