我有本地工作副本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
我不确定会有什么问题。
当前回答
从系统中删除所有github.com凭据详细信息。
对于mac
从Keychain Access中删除github.com密码。
对于windows
从凭证管理器中删除凭证。
其他回答
此消息可以在找到存储库时发生,但我们没有提交访问权。不是措辞巧妙的!
在克隆了老板为我创建的gitHub存储库后,我收到了repo-not-found消息。我可以在本地复制和提交,但不能向上推提交。存储库所有者没有给我写权限。通过请求对回购所有者的写访问来解决。
我通过删除.git文件(隐藏文件夹),然后再次上传解决了这个问题。
在Visual Studio中从Github克隆时,点击Github链接上的“浏览存储库”选项,它将要求登录。
我有其他现有的github存储库,但我错误地认为我可以使用git命令创建存储库。我认为我的问题是没有个人访问令牌,但我仍然不能使用下面的命令来创建我的存储库。
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/username/project.git
git push -u origin main
我不断地得到:
remote: Repository not found.
fatal: repository 'https://github.com/username/project.git/' not found
作为对
git push -u origin main
然而,我发现存储库需要创建使用github cli或在他们的github网站登录到我的帐户后。一旦我这样做了,一切都很顺利。
下面是我发现我不能用git命令创建github存储库的链接。
https://docs.github.com/en/get-started/importing-your-projects-to-github/importing-source-code-to-github/adding-an-existing-project-to-github-using-the-command-line
其他答案都不适合我,我可以在浏览器中查看回购,但当试图获取或做一个新的克隆时,得到了Not Found错误。出于某种原因,这解决了问题:
在浏览器中访问Github repo。 点击绿色的“代码”按钮(如下图)。 选择“使用Github桌面打开”。 Github桌面应该打开并成功获取。 你现在可以关闭Github桌面,从控制台或你选择的Git软件中获取或克隆。