Wget error the certificate of is not trusted

For example, running wget https://www.dropbox.com results in the following errors: ERROR: The certificate of `www.dropbox.com' is not trusted. ERROR: The certificate of `www.dropbox.com' hasn't go...

For example, running wget https://www.dropbox.com results in the following errors:

ERROR: The certificate of `www.dropbox.com' is not trusted.
ERROR: The certificate of `www.dropbox.com' hasn't got a known issuer.

asked Feb 10, 2012 at 7:35

Russell Davis's user avatar

Russell DavisRussell Davis

8,1944 gold badges39 silver badges41 bronze badges

0

If you don’t care about checking the validity of the certificate just add the --no-check-certificate option on the wget command-line. This worked well for me.

NOTE: This opens you up to man-in-the-middle (MitM) attacks, and is not recommended for anything where you care about security.

davr's user avatar

davr

18.7k17 gold badges76 silver badges98 bronze badges

answered Jan 8, 2013 at 15:24

DH4's user avatar

1

Looking at current hacky solutions in here, I feel I have to describe a proper solution after all.

First, you need to install the cygwin package ca-certificates via Cygwin’s setup.exe to get the certificates.

Do NOT use curl or similar hacks to download certificates (as a neighboring answer advices) because that’s fundamentally insecure and may compromise the system.

Second, you need to tell wget where your certificates are, since it doesn’t pick them up by default in Cygwin environment. If you can do that either with the command-line parameter --ca-directory=/usr/ssl/certs (best for shell scripts) or by adding ca_directory = /usr/ssl/certs to ~/.wgetrc file.

You can also fix that by running ln -sT /usr/ssl /etc/ssl as pointed out in another answer, but that will work only if you have administrative access to the system. Other solutions I described do not require that.

answered Mar 6, 2013 at 16:26

Shnatsel's user avatar

ShnatselShnatsel

3,9381 gold badge24 silver badges24 bronze badges

4

If the problem is that a known root CA is missing and when you are using ubuntu or debian, then you can solve the problem with this one line:

sudo apt-get install ca-certificates

SusanW's user avatar

SusanW

1,5401 gold badge12 silver badges22 bronze badges

answered Nov 10, 2012 at 20:41

cguenther's user avatar

cguenthercguenther

1,5491 gold badge10 silver badges14 bronze badges

5

May be this will help:

wget --no-check-certificate https://blah-blah.tld/path/filename

4b0's user avatar

4b0

21.4k30 gold badges95 silver badges139 bronze badges

answered Jun 4, 2018 at 5:10

Alexey Soloviev's user avatar

3

First, the SSL certificates need to be installed. Instructions (based on https://stackoverflow.com/a/4454754/278488):

pushd /usr/ssl/certs
curl http://curl.haxx.se/ca/cacert.pem | awk 'split_after==1{n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1} {print > "cert" n ".pem"}'
c_rehash

The above is enough to fix curl, but wget requires an extra symlink:

ln -sT /usr/ssl /etc/ssl

Community's user avatar

answered Feb 10, 2012 at 7:40

Russell Davis's user avatar

Russell DavisRussell Davis

8,1944 gold badges39 silver badges41 bronze badges

5

apt-get install ca-certificates 

The s makes the difference ;)

Milo's user avatar

Milo

3,2979 gold badges28 silver badges43 bronze badges

answered Jan 16, 2018 at 17:12

Pete's user avatar

PetePete

591 silver badge1 bronze badge

2

I have the similar problem and fixed it by temporarily disabling my antivirus(Kaspersky Free 18.0.0.405). This AV has HTTPS interception module that automatically self-sign all certificates it finds in HTTPS responses.

Wget from Cygwin does not know anything about AV root certificate, so when it finds that website’s certificate was signed with non trust certificate it prints that error.

To fix this permanently without disabling AV you should copy the AV root certificate from Windows certificate store to /etc/pki/ca-trust/source/anchors as .pem file(base64 encoding) and run update-ca-trust

answered Oct 28, 2018 at 23:15

Denis Bakharev's user avatar

Denis BakharevDenis Bakharev

9391 gold badge9 silver badges7 bronze badges

1

In my case, on raspberry pi 3B the timing was in the future (2025) that I need to update to the current local time using ntpdate by passing the time to the past and it solved the issue.

 $ sudo date +%Y%m%d -s "20210101"
 $ sudo ntpdate times1.mike.fi

answered Jul 17, 2021 at 15:04

CoffeePlease's user avatar

I had a similar problem with wget to my own live web site returning errors after installing a new SSL certificate. I’d already checked several browsers and they didn’t report any errors:

wget --no-cache -O - "https://example.com/..." ERROR: The certificate of ‘example.com’ is not trusted. ERROR: The certificate of ‘example.com’ hasn't got a known issuer.

The problem was I had installed the wrong certificate authority .pem/.crt file from the issuer. Usually they bundle the SSL certificate and CA file as a zip file, but DigiCert email you the certificate and you have to figure out the matching CA on your own. https://www.digicert.com/help/ has an SSL certificate checker which lists the SSL authority and the hopefully matching CA with a nice blue link graphic if they agree:

`SSL Cert: Issuer GeoTrust TLS DV RSA Mixed SHA256 2020 CA-1

CA: Subject GeoTrust TLS DV RSA Mixed SHA256 2020 CA-1
Valid from 16/Jul/2020 to 31/May/2023
Issuer DigiCert Global Root CA`

answered Oct 3, 2020 at 23:24

Jonathan Marshall's user avatar

We just had this same issue come up when we installed a newly minted certificate just this last week. I’ve also seen it two other times…yet I’m slow to learn. In all 3 cases I had to get the «intermediate certificates» and install them. In other words My cert was good but it’s signer or it’s signer’s signer wasn’t correctly installed. Make sure you go to your certificate provider’s site and get the correct intermediate certificates and install them as well on your server and then this warning will go away.

It might not JUST be the above, it could also be that clients don’t have updated lists…but I would make sure it’s not just you not fully installing the certificates right FIRST, and then after that going on to the clients and making sure their list is updated.

answered Apr 19, 2021 at 19:16

Uncle Iroh's user avatar

Uncle IrohUncle Iroh

5,6626 gold badges49 silver badges61 bronze badges

Not exactly the same issue. On docker, I was mounting my host filesystem to /etc where OpenSSL certs were already installed which gets overwritten.

Changing the mounting to different filesystem fixed it.

answered Feb 27, 2022 at 0:53

viggy28's user avatar

viggy28viggy28

7109 silver badges21 bronze badges

Thanks to Denis Bakharev I’ve solved that case.

If someone has Cygwin wget not working because ‘certificate not trusted’ and having ca-certificates installed AND having Antivirus that automatically self-sign all certificates it finds in HTTPS responses then you need:

  1. Get root certificate from your AV (I got mine with browser: open any https web-site, check it’s certificate, go to Certification Path tab, click on Root certificate. Then click View certificate button, go to Details tab and click Copy to File... button. Default settings are fine for saving certificate in *.cer file).
  2. Convert *.cer to *.crt. You can use Cygwin’s OpenSSL with the following command:

openssl x509 -inform DER -in <your *.cer certificate file> -out <new cert>.crt

  1. Move new *.crt file to ca-directory (in my case it was /etc/pki/tls/certs/).

That was enough for me to get wget working.

answered May 31, 2022 at 12:13

SteAlzzer's user avatar

Just do

apt-get install ca-certificate

Pang's user avatar

Pang

9,365146 gold badges85 silver badges121 bronze badges

answered Jul 29, 2017 at 6:50

tekintian's user avatar

tekintiantekintian

2793 silver badges3 bronze badges

If you are using windows just go to control panel, click on automatic updates then click on Windows Update Web Site link. Just follow the step. At least this works for me, no more certificates issue i.e whenever I go to https://www.dropbox.com as before.

answered Aug 20, 2014 at 3:13

Saiful's user avatar

1

When I try to run the wget command on http urls I get this error message:

ERROR: The certificate of `url' is not trusted.
ERROR: The certificate of `url' hasn't got a known issuer.

Jeff Schaller's user avatar

Jeff Schaller

65.2k34 gold badges106 silver badges240 bronze badges

asked Jan 4, 2017 at 22:00

Mordechai Hadad's user avatar

Mordechai HadadMordechai Hadad

3111 gold badge2 silver badges4 bronze badges

3

If you are using Debian or Ubuntu, install the ca-certificates package:

$ sudo apt-get install ca-certificates

If you don’t care about checking the validity of the certificate, use the --no-check-certificate option:

$ wget --no-check-certificate https://download/url

Note: The second option is not recommended because of the possibility of a man-in-the-middle attack.

Freddy's user avatar

Freddy

23.5k1 gold badge18 silver badges56 bronze badges

answered Jan 5, 2017 at 4:35

Rakib's user avatar

3

Per TFM for wget use the

--no-check-certificate

option.

«Don’t check the server certificate against the available certificate authorities. Also don’t require the URL host name to match the common name presented by the certificate.»

answered Jan 5, 2017 at 3:29

ivanivan's user avatar

ivanivanivanivan

4,8001 gold badge9 silver badges19 bronze badges

1

In my case, the root caused turned out to be an incorrect system date, which happened to be out of the certificate validity date range at the time of executing pip. This is related to the SSL library and not pip itself. Thus a simple wget or curl call to the offending URL will duplicate the issue.

Of course, I was also able to work around the issue quickly with —no-check—certificate (or equivalent) for wget and pip.

This might be a common case with working with SBC like RasberryPi/BeagleBone or any other system where a real-time clock (RTC) is not present out of the box. So lesson learned: Use NTP for to keep system time up-to-date whenever possible.

answered Jul 30, 2020 at 5:34

user425058's user avatar

1

I have Cygwin installed in my windows system.
I am trying to execute wget command for a website but I am getting the following error message:

ERROR: The certificate of `example.com' is not trusted.
ERROR: The certificate of `example.com' hasn't got a known issuer.

How do I fix this issue — so that I can proceed further.

Community's user avatar

asked Jul 18, 2012 at 21:43

Tripz's user avatar

1

If you don’t care about checking the validity of the certificate just add the --no-check-certificate option on the wget command-line.

Edit:

Not checking the validity of the certificate opens you up to man-in-the-middle attacks (MiTM). Depending on the environment you’re working in (over the Internet vs. a private LAN) this could be a major vulnerability. Your situation and risk profile should inform your decision.

If you do actually care about checking the validity of the certificate you should provide wget with a CA certificate «bundle». Cygwin provides this in the «ca-certificates» package. You can find more specific details in this Stack Overflow answer. It looks like there has been little consensus as to the location of the SSL certificate bundle for Cygwin in the past, resulting in the need to specify its location in configuration files or create symlinks to direct applications to the appropriate directory. Your mileage will vary depending on the version of Cygwin tools you’re using.

Community's user avatar

answered Jul 18, 2012 at 21:52

Evan Anderson's user avatar

Evan AndersonEvan Anderson

141k19 gold badges192 silver badges329 bronze badges

6

Понравилась статья? Поделить с друзьями:
  • Wget error codes
  • Wget error cannot verify certificate
  • Wft 2830 bosch ошибка 1
  • Wfica32 exe ошибка приложения citrix
  • Wf6520n7w ошибка door