今天推送 github,突然推不上去了,
通过 ssh 测试链接,提示如下
ssh -T git@github.com
ssh: connect to host github.com port 22: Operation timed out
这是 22 端口不通了
测试 443 接口
ssh -T -p 443 git@ssh.github.com
... yes 操作后,提示如下
Hi cloudyan! You've successfully authenticated, but GitHub does not provide shell access.
此后修改 ~/.ssh/config
# 将下面这个改为后面的 443 端口配置
# ssh -T git@github.com
# Host github.com
# HostName github.com
# IdentityFile ~/.ssh/github.com_rsa
# Enabling SSH connections over HTTPS
# ssh -T -p 443 git@github.com
Host github.com
HostName ssh.github.com
IdentityFile ~/.ssh/github.com_rsa
Port 443
再试就通了。👍
参考: