wget:443... failed: Connection refused.

使用wget命令提示以下错误:
Resolving raw.githubusercontent.com... 0.0.0.0, ::
Connecting to raw.githubusercontent.com|0.0.0.0|:443... failed: Connection refused.
Connecting to raw.githubusercontent.com|::|:443... failed: Connection refused.

后ping raw.githubusercontent.com 出现127.0.0.1

[root@BidServer ~]# ping raw.githubusercontent.com
PING raw.githubusercontent.com (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.046 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.030 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.030 ms

而后使用windows ping raw.githubusercontent.com 得知真实ip为151.101.8.133,接着回到linux 修改vim /etc/hosts文件

151.101.8.133 raw.githubusercontent.com

再使用wget下载,成功
Resolving raw.githubusercontent.com... 151.101.8.133
Connecting to raw.githubusercontent.com|151.101.8.133|:443... connected.
HTTP request sent, awaiting response... 200 OK

你可能感兴趣的:(wget:443... failed: Connection refused.)