【问题标题】:remote: Repository not found. fatal: repository远程:未找到存储库。致命的:存储库
【发布时间】:2017-11-08 03:10:19
【问题描述】:

我在 github 中的项目已移至另一个 github 帐户。我在当前项目中添加了新的 origin 和 git repo。但是当我将我的新更改推送到新的 github 存储库时,我发现了以下错误消息。请告诉我如何解决它。

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

但我像git remote -v 一样调用返回以下准确结果:

origin  https://github.com/MyDevelopment/project.mm.git (fetch)
origin  https://github.com/MyDevelopment/project.mm.git (push)

【问题讨论】:

  • 您可以通过浏览器访问存储库吗?
  • 是的,当然。我可以通过浏览器访问该仓库
  • 存储库路径中附加了正斜杠,可能是造成这种情况的原因。

标签: git github


【解决方案1】:

仔细检查 URL(区分大小写)

但还要仔细检查您是否有一个 credential helper,该 credential helper 会缓存用于验证您的(旧帐户)凭据(用户名/密码)。

git config credential.helper 

例如,在 Windows 上,这将是 Windows Credential Managers

【讨论】:

    【解决方案2】:

    使用此重置网址

    git remote set-url origin git://new.url.here
    

    一般有以下原因。

    • 检查拼写
    • 检查您的权限
    • 检查您的 SSH 访问权限
    • 检查存储库是否确实存在

    查看详情here

    【讨论】:

    • 这不是一个 ssh URL:它将使用 git 协议,该协议不适用于 GitHub,因为它不支持身份验证。对于 OP 来说,了解为什么 https URL 不起作用是很重要的。
    最近更新 更多