linux wget 下载文件 报错 To connect to xxxx, use ‘--no-check-certificate’ 解决方法

远程调用下载文件直接用wget就可以,一般文件路径类型是http。如果有遇到是https就会下载出错。

错误如下:

[root@vmu010226-node1 tmp]# wget https://www.ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz
--2014-11-25 13:44:16--  http://www.ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz
Resolving www.ohse.de... 144.76.239.252
Connecting to www.ohse.de|144.76.239.252|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz [following]
--2014-11-25 13:44:17--  https://ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz
Resolving ohse.de... 144.76.239.252
Connecting to ohse.de|144.76.239.252|:443... connected.
ERROR: certificate common name “www.ohse.de” doesn’t match requested host name “ohse.de”.
To connect to ohse.de insecurely, use ‘--no-check-certificate’.

只需要在wget后面加上--no-check-certificate就可以,需要一个认证下载指令而已。

wget  --no-check-certificate  https://www.ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz

问题解决

上一篇:linux常用命令


下一篇:Nodejs express body-parser req.body为undefined