wget 无法建立ssl连接 [ERROR: certificate common name ?..ssl.fastly.net?.doesn?. match requested host name ?.ache.ruby-lang.org?. To connect to cache.ruby-lang.org insecurely, use ?.-no-check-certificate?]

通过wget下载文件,报错

[root@Redmine-186 opt]# wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.6.tar.gz
--2018-01-05 13:54:12--  https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.6.tar.gz
Resolving cache.ruby-lang.org... 151.101.229.178, 2a04:4e42:36::434
Connecting to cache.ruby-lang.org|151.101.229.178|:443... connected.
ERROR: certificate common name ?..ssl.fastly.net?.doesn?. match requested host name ?.ache.ruby-lang.org?.
To connect to cache.ruby-lang.org insecurely, use ?.-no-check-certificate?.

无法建立 SSL 连接。

修改命令,取消ssl验证:

wget --no-check-certificate https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.6.tar.gz
原文地址:https://www.cnblogs.com/YatHo/p/8204283.html