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

我打开终端使git按-f

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

我不确定会有什么问题。


当前回答

从系统中删除所有github.com凭据详细信息。

对于mac

从Keychain Access中删除github.com密码。

对于windows

从凭证管理器中删除凭证。

其他回答

请在下面找到Windows的工作解决方案:

从“开始”菜单打开“控制面板”。 选择用户帐户。 选择“凭据管理器”。 点击“管理Windows凭证”。 删除所有与Git或GitHub相关的凭证。 一旦你删除了所有,然后尝试再次克隆。

其他答案都不适合我,我可以在浏览器中查看回购,但当试图获取或做一个新的克隆时,得到了Not Found错误。出于某种原因,这解决了问题:

在浏览器中访问Github repo。 点击绿色的“代码”按钮(如下图)。 选择“使用Github桌面打开”。 Github桌面应该打开并成功获取。 你现在可以关闭Github桌面,从控制台或你选择的Git软件中获取或克隆。

试试这个,对我很管用。

git remote rm origin
git remote add origin https://github.com/your-username/{{project-name}}.git

我也面临着同样的问题

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

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

$ git credential-manager uninstall

$ git credential-manager install

〇解决方案

问题,

$ git clone https://github.com/abc/def.git
Cloning into 'def'...
remote: Repository not found.
fatal: repository 'https://github.com/abc/def.git/' not found

解决方案- 卸载凭据管理器-

abc@DESKTOP-4B77L5B MINGW64 /c/xampp/htdocs
$ git credential-manager uninstall

abc@DESKTOP-4B77L5B MINGW64 /c/xampp/htdocs
$ git credential-manager install

它的工作原理……