首页 > 解决方案 > ssh 连接超时说明

问题描述

谁能解释为什么我们会收到此错误:

fatal: Could not read from remote repository.

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

我从这篇文章中得到了一些解决方案。但我没有得到任何解释为什么或是什么造成了问题。

我将我的配置文件更改为:

#account- github
Host github.com
 HostName ssh.github.com
 Port 443
 IdentityFile ~/.ssh/github_id_ed25519

hostname以前是 github.com,所以我做了那个并附上了ssh.github.com一个port数字。但我仍然想解释为什么会发生这种情况。

这是与操作系统相关的问题吗?还是只是网络问题?

我的意思是更改端口并使用其他端口不是正确的答案,应该有一个解释

标签: gitssh

解决方案


我认为您可能没有将计算机/实例的 ssh 密钥添加到您的帐户,因此您无法访问存储库。

请参阅:https ://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account


推荐阅读