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

原因是22端口被防火墙屏蔽,具体是哪个防火墙尚未找到,可以参考官方的建议配置~/.ssh/config,来使用备用服务器端口。

Host gitlab.com
  Hostname altssh.gitlab.com
  User git
  Port 443
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_rsa
原文地址:https://www.cnblogs.com/chenyanger/p/13853873.html