git clone hangs forever on github

前端 未结 8 1385
一生所求
一生所求 2020-12-03 04:26

When I follow point 5 (Test everything out) in the github guide, the ssh command also hangs forever. According to the guide, I should be presented with a message that \"Gith

8条回答
  •  攒了一身酷
    2020-12-03 05:07

    In my case port 22 was being blocked by a firewall, cloning via https may not work if you have 2-factor authentication enabled. Instead edit your .ssh config to use another port. In your terminal:

    nano ~/.ssh/config
    

    then add this:

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

提交回复
热议问题