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

发布时间:2024年01月17日

解决流程

1.将github的端口由22改为443

ssh -T -p 443 git@ssh.github.com

2.接着输入yes进行确认

The authenticity of host '[ssh.github.com]:443 ([192.168.1.100]:443)' can't be established.
TG45532 key fingerprint is SHA256:+dfjeDFlkkfdfkDFKEidkfkDFkkKKdjFESDCFLE.
This host key is known by the following other names/addresses:
? ? ~/.ssh/known_hosts:1: github.com
Are you sure you want to continue connecting (yes/no/[fingerprint])??
?

3.在C:\Users\.ssh目录下创建config文件,输入?

Host github.com
? HostName ssh.github.com
? Port 443
?

4.然后进行git push就能推上去,或者使用git pull就能下拉下来。?

文章来源:https://blog.csdn.net/Blackrosetian/article/details/135643655
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。