我有本地工作副本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
我不确定会有什么问题。
当前回答
您可以尝试删除目录中的.git文件,并重新执行所有操作将解决您的问题!
其他回答
此消息可以在找到存储库时发生,但我们没有提交访问权。不是措辞巧妙的!
在克隆了老板为我创建的gitHub存储库后,我收到了repo-not-found消息。我可以在本地复制和提交,但不能向上推提交。存储库所有者没有给我写权限。通过请求对回购所有者的写访问来解决。
更新.git目录中的用户名和令牌。
转到git文件夹,进入。git文件夹,打开“config”文件 使用记事本或任何其他编辑器更改您的URL从 https://github.com/username/repo_name.git https://username:token@github.com/username/repo_name.git 用户名应该没有@域名。 保存并推送代码,它将工作。 在这里,您需要保存密码和 安全威胁。
有时ssh凭证是安装在你的电脑上与github回购通信。 当你设置新的repo:如果你添加了https格式的origin,你的git凭证管理器不能找出repo。
检查产地格式
git remote -v
https格式的来源
origin https://github.com/username/repo_name.git
ssh格式的原点
origin git@github.com:username/repo_name.git
删除https格式的origin
git remote remove origin
添加ssh格式的origin
git remote add origin git@github.com:username/repo_name.git
在ubuntu上,我遇到了这个问题。我通过运行下面的命令重置凭据帮助器来解决这个问题。
git config credential.helper ""
运行此命令后,当您拉或推时,将要求您再次输入凭据。
在我们的案例中,这只是一个在github中授予写权的案例。最初用户只有读权限,它给出了这个错误。