Git凭证助手会导致“找不到存储库”错误? [英] Git credential helper causes "repository not found" error?

查看:341
本文介绍了Git凭证助手会导致“找不到存储库”错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




$ git pull $ b $只是碰到了这个Git行为,看起来像一个凭证存储的错误: b'https://github.com'的用户名:...
'https://...@github.com'的密码:...
已经是最新的。
$ git config credential.helper store
$ git pull
remote:找不到存储库。



然后,编辑.git / config以删除 [credential] helper = store 和git pull再次工作。



有什么可能导致它?



如何使用凭证助手而不会遇到此错误?

更新在Ubuntu 14.04上使用git 1.9.1



更新使用git 2.9.3重新测试,结果相同。

b

更新我在〜/ .git-credentials中的github上有几个帐户。我使用GIT_CURL_VERBOSE = 1运行git_GIT_TRACE = 1,它看起来像按照它们列出的顺序选择第一个github帐户。但是,我正在使用的仓库中的.git / config具有正确的user.email,它在〜/ .git-credentials中具有匹配的条目。它只是不使用该条目。

解决方案

我在.git文件夹中打开了配置文件。 / p>

现在您需要插入:

  [凭证https:/ /github.com/yourProjectPath] 

username = yourGithubUsername

之后你可以使用:

  git config credential.helper store 

git pull
code>

并填写您的密码。


Just ran into this Git behavior which looks like a bug with credential-store:

$ git pull Username for 'https://github.com': ... Password for 'https://...@github.com': ... Already up-to-date. $ git config credential.helper store $ git pull remote: Repository not found.

Then, go and edit .git/config to remove [credential] helper = store and git pull works again.

What could cause it?

How do I use credential helper without running into this error?

UPDATE Using git version 1.9.1 on Ubuntu 14.04

UPDATE Retested with git version 2.9.3, same result.

UPDATE I have several accounts on github in ~/.git-credentials. I ran git with GIT_CURL_VERBOSE=1 GIT_TRACE=1 and it looks like it picks the first github account in the order they're listed.

However .git/config in the repo I'm working in has the correct user.email, which does have a matching entry in ~/.git-credentials. It just doesn't use that entry.

解决方案

What worked for me was in .git folder I opened the config file.

Now you need to insert:

[credential "https://github.com/yourProjectPath"]

username = yourGithubUsername

After this you can use:

git config credential.helper store

git pull

And fill in your password.

这篇关于Git凭证助手会导致“找不到存储库”错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆