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

更新于 阅读 5

使用git push向github推代码时报如下错误:

ssh: connect to host github.com port 22: Operation timed out fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

这是防火墙组织了22端口。

修改.ssh下的config文件即可

Host github.com HostName ssh.github.com Port 443 User git

HostName改为 ssh.github.comPost改为443端口即可。