Git - remote:找不到存储库

问题描述:

我有本地工作副本的SourceTree。而且所有的操作都很好,我可以通过SourceTree简单地获取,推送,拉等等。我只需要进行强制推送,这在SourceTree中不存在。Git - remote:找不到存储库

我打开终端进行混帐推-f

remote: Repository not found. 
fatal: repository 'https://github.com/MyRepo/project.git/' not found 

我不知道什么可能是一个问题。

+0

你确定这只会失败,只有'git push -f',但与常规的推,拉和取的工作? – everton

+0

[Git Push ERROR:Repository not found]可能重复(http://*.com/questions/10116373/git-push-error-repository-not-found) –

因为你可能没有先识别你的终端的远程git仓库。

git remote set-url origin https://github.com/MyRepo/project.git 

然后,

git add . 
git commit -m "force push" 
git push origin master --force 
+0

这对我有效。 – Wilker

这可能是认证的问题。 SourceTree缓存您的github凭证(用于通过https访问存储库),但是您必须使用凭据配置git(https://help.github.com/articles/creating-an-access-token-for-command-line-use/)或使用git + ssh和ssh密钥对(https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/)来配置git。

发现存储库时发生此消息,但我们没有提交访问权限。措辞不够好!

克隆我的老板为我创建的gitHub存储库后,我收到了未找到回购的消息。我可以在本地克隆和提交,但无法向上游推送提交。资料库所有者没有给我写访问权限。通过对回购所有者的书面访问请求予以解决。

您可能正尝试推送到私人存储库。在这种情况下,您将不得不要求管理员为协作者访问权限进行身份验证。

我也面临着同样的问题

remote: Repository not found 
fatal: repository 'https://github.com/MyRepo/project.git/' not found 

远程:库未找到。 致命︰存储库'https://github.com/MyRepo/project.git/'找不到

我卸载了git凭证管理器并重新安装它,然后我可以轻松地拉和推到存储库。这里是命令

$ git credential-manager uninstall 

$ git credential-manager install