「已解决」ssh: connect to host github.com port 22: Connection timed out

问题描述

git push时遇到问题:

ssh: connect to host github.com port 22: Connection timed out

现象

$ ssh -T [email protected]
ssh: connect to host github.com port 22: Connection timed out

$ ssh -T -p 443 [email protected]
Hi xxx! You've successfully authenticated, but GitHub does not provide shell access.

解决方案

$ vim ~/.ssh/config

# 添加如下
Host github.com
  Hostname ssh.github.com
  Port 443

你可能感兴趣的:(Git,ssh,github,运维)