无法使用 ssh 从 github 克隆私有仓库

发布于 2025-01-13 13:13:25 字数 906 浏览 1 评论 0原文

我在 github.com 上拥有帐户已经有一段时间了。添加我的 ssh 密钥,并且可以毫无问题地克隆其他公共和私有(一旦授予)存储库。

下面的命令确认 github 身份验证是否成功。

$ ssh -T [email protected]
Hi naidu! You've successfully authenticated, but GitHub does not provide shell access.
$

最近我和我的朋友获得了访问私人存储库的权限。我的朋友可以克隆该存储库,但我不能。当我尝试时,出现以下错误:

$ git clone [email protected]:private_org_repo/xxxx-yyyy.git
Cloning into 'xxxx-yyyy'...
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 进行克隆,但这不是我想要的。

任何人都可以提供一些关于还可以尝试什么的线索吗?

I have an account with github.com for some time now. Have my ssh key added and can clone other public as well as private (once granted) repos without any problem.

Below command to confirm that github authentication is successful.

$ ssh -T [email protected]
Hi naidu! You've successfully authenticated, but GitHub does not provide shell access.
$

Lately me and my friend was given access to a private repository. My friend can clone the repo but I cannot. When I try, I get below error:

$ git clone [email protected]:private_org_repo/xxxx-yyyy.git
Cloning into 'xxxx-yyyy'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

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

Searched whole internet looking for a possible glitch but I could not find any solution so far. I am able to clone using https but this is not what I want.

Anyone can give some clues on what else to try?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

可爱暴击 2025-01-20 13:13:25

有点连线,但删除 github.com 上的现有密钥并阅读有所帮助。但无法解释为什么它有效。

Was bit wired but deleting the existing keys at github.com and reading helped. Cannot explain why it worked though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文