TIPS之 github Push/Pull 失败的问题

github Push/Pull 失败的问题

Posted by 董江 on Monday, January 29, 2024

Github Push/Pull 失败的问题

git报错Failed to connect to github.com port 443 after 31421ms: Timed out

场景: 在git clone/push/pull时,一直报错Failed to connect to github.com port 443 after xxxms: Timed out

解决方式

git配置proxy的命令:

# 配置socks5/ssr代理
git config --global http.proxy socks5/socks5h 127.0.0.1:1086
git config --global https.proxy socks5/socks5h 127.0.0.1:1086

# 配置http代理
git config --global http.proxy 127.0.0.1:7890
git config --global https.proxy 127.0.0.1:7890

验证

dongjiang@MacBook Pro:~ $ ping ssh.github.com   
PING ssh.github.com (20.205.243.160): 56 data bytes
64 bytes from 20.205.243.160: icmp_seq=0 ttl=108 time=126.246 ms
64 bytes from 20.205.243.160: icmp_seq=1 ttl=108 time=139.719 ms
64 bytes from 20.205.243.160: icmp_seq=2 ttl=108 time=105.197 ms
64 bytes from 20.205.243.160: icmp_seq=3 ttl=108 time=125.357 ms

「如果这篇文章对你有用,请随意打赏」

Kubeservice博客

如果这篇文章对你有用,请随意打赏

使用微信扫描二维码完成支付