欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

解决 connect to host github.com port 22 operation timed out

发布时间:2025/3/14 编程问答 45 豆豆
生活随笔 收集整理的这篇文章主要介绍了 解决 connect to host github.com port 22 operation timed out 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

本来好好地.不知道为什么不能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.com 2 Hostname ssh.github.com 3 Port 443

测试

ssh -T git@github.com The 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)? yes Warning: 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.

 

转载于:https://www.cnblogs.com/or2-/p/6185917.html

总结

以上是生活随笔为你收集整理的解决 connect to host github.com port 22 operation timed out的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。