How do I fix certificate errors when running wget on an HTTPS URL in Cygwin?

前端 未结 10 1260
遥遥无期
遥遥无期 2020-12-07 07:40

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

ERROR: The certificate of `www.dropbox.com\' is not trusted.
         


        
相关标签:
10条回答
  • 2020-12-07 08:09

    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.

    0 讨论(0)
  • 2020-12-07 08:10

    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
    
    0 讨论(0)
  • 2020-12-07 08:13

    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.

    0 讨论(0)
  • 2020-12-07 08:13

    Just do

    apt-get install ca-certificate
    
    0 讨论(0)
提交回复
热议问题