gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 13:49:12 25 4
gpt4 key购买 nike

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

  • 使用 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/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com