我有本地工作副本SourceTree。和所有的操作工作得很好,我可以简单的获取,推,拉等通过SourceTree。我只需要在SourceTree中不存在的force push。
我打开终端使git按-f
remote: Repository not found.
fatal: repository 'https://github.com/MyRepo/project.git/' not found
我不确定会有什么问题。
我有本地工作副本SourceTree。和所有的操作工作得很好,我可以简单的获取,推,拉等通过SourceTree。我只需要在SourceTree中不存在的force push。
我打开终端使git按-f
remote: Repository not found.
fatal: repository 'https://github.com/MyRepo/project.git/' not found
我不确定会有什么问题。
当前回答
我也面临着同样的问题
remote: Repository not found
fatal: repository 'https://github.com/MyRepo/project.git/' not found
我卸载了git凭证管理器并重新安装了它,然后我就可以很容易地将它拉到存储库中。下面是命令
$ git credential-manager uninstall
$ git credential-manager install
其他回答
如果你没有写权限,只有读权限,就会发生这种情况。 如果它是一个私有存储库,您应该被添加为合作者。 检查你的证件是否正确。
Git实际上不会说这些事情,它只会说,你的凭证没有发现回购。
祝你好运。
因为您可能没有首先将远程git存储库标识到您的终端。
git remote set-url origin https://github.com/MyRepo/project.git
然后,
git add .
git commit -m "initial commit"
git push origin master
对我的团队来说,这是一个权限问题。在GitHub设置中,我们团队中的所有成员都将其设置为阅读模式。一旦我们将下拉菜单更改为“写入”,我们就都能够成功地克隆和推回。
我有同样的问题,并发现我在~/中有另一个密钥文件。ssh到不同的GitHub存储库。不知怎么的,它代替了新的。
在我的情况下,我不能克隆github由于用户是错误的。
转到~/.gitconfig 然后尝试删除这行代码(只需删除它,然后保存文件)。
[user]
name = youruser
email = youruser@domain.com
或者尝试在CMD或终端中使用一行代码:git config——global——remove-section user
并尝试再次做git克隆。希望它能帮你度过美好的一天。><