为什么我的 SSH 在连接到 github 时挂在那里?

eag*_*les 4 ssh cygwin github

这就是我今天尝试做的十次没有成功的事情:

  • 使用 ssh-keygen 生成密钥。
  • 使用 Gedit 或 Notepad++ 打开 ~/.ssh/id_rsa.pub 并复制内容。
  • 转到 github.com 上的帐户设置
  • 转到 SSH 密钥
  • 单击添加密钥按钮。
  • 给钥匙一个标题
  • 将钥匙粘贴到钥匙箱中。
  • 保存密钥(输入我的github密码进行验证)。

然后,我在 cygwin 中运行 '$ ssh -vT git@github.com',但它总是挂在那里。这是输出:

$ ssh -vT git@github.com
OpenSSH_6.0p1, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /home/eason.wu/.ssh/config
debug1: /home/eason.wu/.ssh/config line 1: Applying options for github.com
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug1: identity file /home/eason.wu/.ssh/id_rsa type 1
debug1: identity file /home/eason.wu/.ssh/id_rsa-cert type -1
Run Code Online (Sandbox Code Playgroud)

有没有人遇到这个问题,任何解决方案将不胜感激

Von*_*onC 5

请确保你没有复制公钥作为一个线,因为从一个编辑的副本可有时缓冲区键几行的内容。

如果仍有问题,请查看“无法将 Git 推送到 Github ”中的其他 SSH 调试提示。
Assh -vvvT git@github.com可以显示更多的调试信息。


OP陈奕迅吴评论:

我找到了这个问题的真正原因,它是由我的网络引起的。
有些网站被我公司禁止,我认为这也会影响GitHub服务。
在我打开 VPN 连接并再次使用 重新测试后ssh -vvvT git@github.com,它成功通过