今天推送 github,突然推不上去了,

    通过 ssh 测试链接,提示如下

    1. ssh -T git@github.com
    2. ssh: connect to host github.com port 22: Operation timed out

    这是 22 端口不通了

    测试 443 接口

    1. ssh -T -p 443 git@ssh.github.com
    2. ... yes 操作后,提示如下
    3. Hi cloudyan! You've successfully authenticated, but GitHub does not provide shell access.

    此后修改 ~/.ssh/config

    1. # 将下面这个改为后面的 443 端口配置
    2. # ssh -T git@github.com
    3. # Host github.com
    4. # HostName github.com
    5. # IdentityFile ~/.ssh/github.com_rsa
    6. # Enabling SSH connections over HTTPS
    7. # ssh -T -p 443 git@github.com
    8. Host github.com
    9. HostName ssh.github.com
    10. IdentityFile ~/.ssh/github.com_rsa
    11. Port 443

    再试就通了。👍

    参考: