简体   繁体   English

github 帐户的 ssh 问题

[英]ssh issues for github account

I recently added added an ssh key to my github account using the steps recommended on the site.我最近使用网站上推荐的步骤向我的 github 帐户添加了一个 ssh 密钥。
When I try to clone repos from an organization that I am a member of, I get the following error message:当我尝试从我所属的组织克隆存储库时,我收到以下错误消息:

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

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

I am pretty sure I have correct access rights because I can clone using HTTPS just fine.我很确定我有正确的访问权限,因为我可以很好地使用 HTTPS 进行克隆。
Does anybody know of an easy solution to this problem?有人知道这个问题的简单解决方案吗?

First, make sure the URL used is the correct one (it is case sensitive), and uses the user ' git ' (not your GitHub account name)首先,确保使用的 URL 是正确的(区分大小写),并使用用户“ git ”(不是您的 GitHub 帐户名)

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

Second, if the problem persists, follow Troubleshooting SSH其次,如果问题仍然存在,请按照SSH 故障排除

  • The private key might have been created with a passphrase (meaning you would need ssh-agent)私钥可能是使用密码创建的(这意味着您需要 ssh-agent)
  • The environment variable GIT_SSH might be defined (and reference something else than openssh)可能定义了环境变量GIT_SSH (并引用了 openssh 以外的其他内容)
  • ... ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM