【问题标题】:ssh issues for github accountgithub帐户的ssh问题
【发布时间】:2021-02-19 09:31:20
【问题描述】:

我最近使用网站上推荐的步骤向我的 github 帐户添加了一个 ssh 密钥。
当我尝试从我所属的组织克隆存储库时,我收到以下错误消息:

ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我很确定我有正确的访问权限,因为我可以使用 HTTPS 进行克隆。
有人知道这个问题的简单解决方案吗?

【问题讨论】:

    标签: git github ssh ssh-keys


    【解决方案1】:

    首先,确保使用的 URL 正确(区分大小写),并使用用户“git”(不是您的 GitHub 帐户名)

    git clone git@github.com:<aUser>/<aRepository>
              ^^^^
    

    其次,如果问题依旧,关注Troubleshooting SSH

    • 私钥可能是使用密码创建的(这意味着您需要 ssh-agent)
    • 环境变量 GIT_SSH 可能已定义(并引用 openssh 以外的其他内容)
    • ...

    【讨论】:

      猜你喜欢
      • 2021-07-05
      • 2021-03-28
      • 2011-03-14
      • 2018-03-17
      • 1970-01-01
      • 2014-10-28
      • 1970-01-01
      相关资源
      最近更新 更多