ssh:连接到主机ssh.github.com端口443:连接到github时超时



自从上次Ubuntu更新以来,我无法使用cmd进行推送,我也不知道为什么(可能是巧合(。

如果我键入:

ssh -T git@github.com 

->ssh:连接到主机github.com端口22:连接超时

ssh -T -p 443 git@ssh.github.com 

->ssh:连接到主机ssh.github.com端口443:连接超时

现在我只有一对密钥,添加到我的github帐户的id_ed25519.pub
我的~/.ssh/config看起来像:

Host github.com
Hostname ssh.github.com
Port 443

我不明白的是,如果我使用SmartGit进行推送,它会要求我提供密钥和密码短语,我可以使用id_ed25519密钥进行推送

  • 我没有防火墙
  • 我试着用其他网络来检查我的ISP是否阻止了这些端口(22(,但没有成功
  • 如果我将repo从CCD_ 1更改为CCD_;密码

我确实在寻找解决方案,但没有一个对我有效,这就是我在这里发帖的原因。

如果您想使用SSH配置,您需要使用github.com(即"Host"名称(作为URL,如文档所示:

Host github.com
Hostname ssh.github.com
Port 443
User git
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes

然后,您可以使用存储库的远程URL测试ssh -Tv github.com

ssh://github.com/username/repo
# or
github.com:username/repo

最新更新