wget download file - --no-check-certificate error?

43,857

There's no error but warning. --no-check-certificate makes wget to continue despite verification failure, but it still will complain - without that option set wget would simply stop once verification failed.

There's nothing to worry about if you used that option intentionally. If you want to get rid of it you just need to either use certificate from widely known CA or use options like --ca-directory or --ca-certificate to make wget know your certificate issuer.

wget docs: 2.8 HTTPS (SSL/TLS) Options

EDIT

Trusted certificates basically means certificates issued by CA known by the app - there's database of known and trusted CAs and if your certificate issuer matches, then it is all fine. If not, warning is shown. To get rid of this you need to tell the app that you want it to trust your CA too, and that's what you can achieve by using options mentioned previously.

Share:
43,857
Fraze Jr.
Author by

Fraze Jr.

Updated on July 09, 2022

Comments

  • Fraze Jr.
    Fraze Jr. almost 2 years

    I have a cron which downloads every 24hrs a csv data to my server. Because the provider who hosts this csv only allows browsers to download the csv file, I fake my identity. But the problem is that I still get an error.

    Does anyone knows how I can fix that issue?

    My wget query:

    wget --no-check-certificate -O "/httpdocs/cronjob/data/gamesdeal.csv" "http://www.gamesdeal.com/media/feedgenerator/Gamekey.csv" --header="User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:23.0) Gecko/20100101 Firefox/23.0" --header="Accept: image/png,image/*;q=0.8,*/*;q=0.5" --header="Accept-Language: en-US,en;q=0.5" --header="Accept-Encoding: gzip, deflate" --header="Referer: http://www.gamesdeal.com"
    

    My returned error:

    --2017-03-13 02:55:02--  http://www.gamesdeal.com/media/feedgenerator/Gamekey.csv
    Resolving www.gamesdeal.com (www.gamesdeal.com)... 104.25.181.29, 104.25.180.29, 2400:cb00:2048:1::6819:b41d, ...
    Connecting to www.gamesdeal.com (www.gamesdeal.com)|104.25.181.29|:80... connected.
    HTTP request sent, awaiting response... 301 Moved Permanently
    Location: https://www.gamesdeal.com/media/feedgenerator/Gamekey.csv [following]
    --2017-03-13 02:55:02--  https://www.gamesdeal.com/media/feedgenerator/Gamekey.csv
    Connecting to www.gamesdeal.com (www.gamesdeal.com)|104.25.181.29|:443... connected.
    WARNING: cannot verify www.gamesdeal.com's certificate, issued by 'CN=COMODO ECC Domain Validation Secure Server CA 2,O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB':
      Unable to locally verify the issuer's authority.
    HTTP request sent, awaiting response... 200 OK
    Length: 623444 (609K) [application/octet-stream]
    Saving to: '/httpdocs/cronjob/data/gamesdeal.csv'
    
         0K .......... .......... .......... .......... ..........  8% 2.58M 0s
        50K .......... .......... .......... .......... .......... 16% 3.96M 0s
       100K .......... .......... .......... .......... .......... 24% 6.85M 0s
       150K .......... .......... .......... .......... .......... 32% 8.32M 0s
       200K .......... .......... .......... .......... .......... 41% 5.89M 0s
       250K .......... .......... .......... .......... .......... 49% 10.2M 0s
       300K .......... .......... .......... .......... .......... 57% 10.4M 0s
       350K .......... .......... .......... .......... .......... 65% 6.14M 0s
       400K .......... .......... .......... .......... .......... 73% 8.54M 0s
       450K .......... .......... .......... .......... .......... 82% 9.62M 0s
       500K .......... .......... .......... .......... .......... 90% 7.48M 0s
       550K .......... .......... .......... .......... .......... 98% 4.24M 0s
       600K ........                                              100% 10.9M=0.1s
    
    2017-03-13 02:55:02 (5.97 MB/s) - '/httpdocs/cronjob/data/gamesdeal.csv' saved [623444/623444]
    

    Greetings and Thank You!

  • Fraze Jr.
    Fraze Jr. over 7 years
    I do not worry about it. But I want to get informed if I my cron has thrown any issue. And If I select only "Inform me by errors" I get this message. So I want to fix that "warning". Because then I still get error messages but not this one. So, you say just add --ca-certificat?
  • Fraze Jr.
    Fraze Jr. over 7 years
    Where should I add it? - If I add it behind the --no-check-certificate I get a error...
  • Marcin Orlowski
    Marcin Orlowski over 7 years
    Adding it w/o knowing what exactly you are doing is not going to give much effects in most cases. You have to RTFM first