github port 22 not working
今天在使用github的时候,发现git push的时候报错:
1 | ssh: connect to host github.com port 22: Connection timed out |
解决办法,使用443端口,首先测试是否可用。
1 | ssh -T -p 443 git@ssh.github.com |
如果可以正常连接,那么就可以修改~/.ssh/config文件,添加如下内容:
1 | Host github.com |
然后再次测试:
1 | ssh -T git@github.com |
输出如下信息:
1 | Hi Philip! You've successfully authenticated, but GitHub does not provide shell access. |
接下来就可以愉快的使用git了。