我有本地工作副本SourceTree。和所有的操作工作得很好,我可以简单的获取,推,拉等通过SourceTree。我只需要在SourceTree中不存在的force push。

我打开终端使git按-f

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

我不确定会有什么问题。


当前回答

此消息可以在找到存储库时发生,但我们没有提交访问权。不是措辞巧妙的!

在克隆了老板为我创建的gitHub存储库后,我收到了repo-not-found消息。我可以在本地复制和提交,但不能向上推提交。存储库所有者没有给我写权限。通过请求对回购所有者的写访问来解决。

其他回答

禁用GIT证书对我有帮助:

git config --global --unset credential.helper

我也面临着同样的问题

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

我卸载了git凭证管理器并重新安装了它,然后我就可以很容易地将它拉到存储库中。下面是命令

$ git credential-manager uninstall

$ git credential-manager install

我也有同样的问题

通过检查http。在git配置中的代理值(我的是不正确的和不需要的), 因此我删除了http。从git配置的代理值

命令:

列出文件中的配置项

git config --list

删除代理

git config --global --unset http.proxy

问题解决了!

如果你在windows上得到控制面板-> windows凭据,然后从通用凭据选项删除github凭据。然后尝试克隆

在我的情况下,上述解决方案都不起作用。

我通过将remote.origin.url从https切换到ssh来解决这个问题:

验证git配置:

git config --list

应该是这样:

...
remote.origin.url=https://github.com/ORG/repo-name.git
...

使用SSH更新remote.origin.url:

git remote set-url origin git@github.com:ORG/repo-name.git