本来好好地.不知道为什么不能push了.估计是被墙,于是搜搜解决办法.改换端口
参考 https://mozillazg.com/2015/08/use-443-port-fix-github-connection-timeout.html
参开: https://help.github.com/articles/using-ssh-over-the-https-port/
修改 ~/.ssh/config 中 github.com 的配置, Hostname
改为 ssh.github.com
, Port
改为 443
:
如果没有config文件就手动创建一个
1 Host github.com2 Hostname ssh.github.com3 Port 443
测试
ssh -T git@github.comThe authenticity of host '[ssh.github.com]:443 ([xxx.xxx.xxx.xxx]:443)' can't be established.RSA key fingerprint is SHA256:xxxxxxxx....Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added '[ssh.github.com]:443,[xxx.xxx.xxx.xxx]:443' (RSA) to the list of known hosts.Hi unixc3t! You've successfully authenticated, but GitHub does not provide shell access.