在工作中git push
时发现
ssh: connect to host github.com port 22: Operation timed out
fatal: Could not read from remote repository.
网上的方法编辑~/.ssh/config
Host github.com
Hostname ssh.github.com
Port 443
使用ssh -T -p 443 git@ssh.github.com
查看能否连接 依旧不行
1.打开 ipaddress.com 网站,查询以下网址对应地IP
网站地址 :https://websites.ipaddress.com/
2.需要查询地网址ip
1、github.com
2、github.global.ssl.fastly.net
3.复制查询后地ip,然后在hosts文件中做出相应地修改(hosts文件路径:C:\Windows\System32\drivers\etc)
保存后退出发现gitpush成功