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

我打开终端使git按-f

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

我不确定会有什么问题。


当前回答

这可能是一个重叠的问题,你在同一时间配置不同的帐户。

试着检查:

git config user.name git config user.email

检查是否与远程回购相同。

查看repo git remote -v

其他回答

检查url s.source是否正确。

为我树立榜样

// fail Project>>t<<est

s.source = { :git => '.../Projecttest-iOS', :tag => s.version.to_s }

// success    Project>>T<<est
s.source = { :git => '.../ProjectTest-iOS', :tag => s.version.to_s }

我也面临着同样的问题

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

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

$ git credential-manager uninstall

$ git credential-manager install

在Mac

如果您正在尝试克隆repo....然后这个问题可能会发生,因为你没有回购目前在github帐户目前在钥匙串访问。为了解决这个问题,请尝试使用帐户名进行克隆

Git 克隆 https://username@github.com/org/repo.git

取代

用户名与你的GitHub用户名 与您的组织名称 使用存储库名称进行回购

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

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

如果您正在使用访问密钥,请在创建访问密钥时给予适当的权限(我尝试了所有权限,它可以工作)