码迷,mamicode.com
首页 > Web开发 > 详细

wget下载HTTPS链接

时间:2017-04-25 13:25:35      阅读:337      评论:0      收藏:0      [点我收藏+]

标签:cte   arc   cert   报错   nec   nbsp   www   文件   是什么   

wget -c -O master.zip --no-check-certificate https://github.com/mitsuhiko/flask/archive/master.zip

# master.zip 为文件名
# https://... 为链接

 


wget是linux最常用的下载命令, 通常的运用要领是: “wget 空格+要下载文件的url路径”。

  比方 : [linux]# wget http://www.test.com/xxxx/xxx.tar.gz

  其中-c参数, 支持断点续传, 下载大文件时,假如不注意终止了, 能够继续运用命令接着下载。

  比方 : [linux]# wget -c http://www.test.com/xxxx/xxx.tar.gz

直接使用wget下载github.com HTTPS链接,报错

[linux]# wget https://github.com/mitsuhiko/flask/archive/master.zip

[root@11_09 ~]# wget https://github.com/mitsuhiko/flask/archive/master.zip
--2013-08-18 12:55:24--  https://github.com/mitsuhiko/flask/archive/master.zip
Resolving github.com... 204.232.175.90
Connecting to github.com|204.232.175.90|:443... connected.
ERROR: cannot verify github.com‘s certificate, issued by `/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV CA-1‘:
  Unable to locally verify the issuer‘s authority.
To connect to github.com insecurely, use `--no-check-certificate‘.
Unable to establish SSL connection.

增加一个选项--no-check-certificate

[linux]# wget --no-check-certificate https://github.com/mitsuhiko/flask/archive/master.zip

可又增加一个问题,保存下来的文件是master,未知是什么格式。再增加一个选项-O xxx。

[linux]# wget -O master.zip --no-check-certificate https://github.com/mitsuhiko/flask/archive/master.zip

保存下来的是master.zip,与预想一致。配合-c参数,实现断点续传,PERFECT。

最络结果:[linux]#wget -c -O master.zip --no-check-certificate https://github.com/mitsuhiko/flask/archive/master.zip

 

dd

wget下载HTTPS链接

标签:cte   arc   cert   报错   nec   nbsp   www   文件   是什么   

原文地址:http://www.cnblogs.com/hanggegege/p/6761104.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!