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

我打开终端使git按-f

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

我不确定会有什么问题。


当前回答

我通过删除.git文件(隐藏文件夹),然后再次上传解决了这个问题。

其他回答

您可以尝试删除目录中的.git文件,并重新执行所有操作将解决您的问题!

禁用GIT证书对我有帮助:

git config --global --unset credential.helper

在Mac

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

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

取代

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

检查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 }

Linux用户:

Git远程rm来源

git远程添加origin https://GITHUB_USERNAME:PERSONAL_ACCESS_TOKEN@github.com/username/reponame.git

生成新令牌