ssh - 为什么我的 SSH 在连接到 github 时卡在那里?

标签 ssh github cygwin

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

  • 使用 ssh-keygen 生成 key 。
  • 使用 Gedit 或 Notepad++ 打开 ~/.ssh/id_rsa.pub 并复制内容。
  • 转到 github.com 上的帐户设置
  • 转至 SSH key
  • 单击添加 key 按钮。
  • 给 key 一个标题
  • 将 key 粘贴到 key 箱中。
  • 保存 key (输入我的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
    

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

    最佳答案

    确保您确实将公钥复制为一行,因为来自编辑器的副本有时可以将该 key 的内容缓冲为多行。

    如果仍有问题,请查看“Unable to Git-push master to Github”中的其他 SSH 调试提示。
    A ssh -vvvT git@github.com可以显示更多的调试信息。

    OP Eason Wu注释:

    I found the real reason of this problem, it is caused by my network.
    Some websites are prohibited by my company, I would think it also affects GitHub service.
    After I turn on an VPN connection, and retest again with ssh -vvvT git@github.com, it passed successfully

    关于ssh - 为什么我的 SSH 在连接到 github 时卡在那里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11716399/

    相关文章:

    python - 在 ssh 中运行 Python Selenium webdriver

    mysql - 是否可以在本地 Linux 机器上设置 Azure 混合连接管理器 (HCM)?

    sql-server-2008 - 如何从 GitHub 将 SQL 数据库部署到 AppHarbor?

    opencv - 从 ffmpeg 流式传输视频并使用 OpenCV 捕获

    cygwin - 尝试运行 Docker 导致退出代码 127

    javascript - 通过 Web 浏览器的 SSH 隧道

    git - 无法通过 HTTP 克隆远程 Git 镜像,但可以通过 SSH

    linux - Jenkins 在远程机器上执行带有参数的 shell 脚本

    node.js - node-v57-linux-x64/grpc_node.node 缺失

    gcc - Cygwin 上的 C 编译器生成什么?