Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wget on Windows gives 'ERROR: cannot verify x's certificate,' #1688

Closed
onet4 opened this issue Mar 4, 2015 · 3 comments
Closed

wget on Windows gives 'ERROR: cannot verify x's certificate,' #1688

onet4 opened this issue Mar 4, 2015 · 3 comments

Comments

@onet4
Copy link

onet4 commented Mar 4, 2015

Hi,

When I tried to run install-wp-tests.sh, on the line that uses wget, I got this:

ERROR: cannot verify raw.github.com's certificate, issued by 'CN=DigiCert SHA2 H
igh Assurance Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US':
Unable to locally verify the issuer's authority.
To connect to raw.github.com insecurely, use `--no-check-certificate'.

I tried both versions of wget 1.11.4 (http://gnuwin32.sourceforge.net/packages/wget.htm) and 1.16.1 (https://eternallybored.org/misc/wget/) and both gave this error.

It seems to occur when trying to access a url with the https protocol. If I add the --no-check-certificate option, it works.

wget -nv -O /tmp/wordpress.tar.gz https://wordpress.org/${ARCHIVE_NAME}.tar.gz --no-check-certificate
@danielbachhuber
Copy link
Member

The error is probably with this call:

wget -nv -O $WP_CORE_DIR/wp-content/db.php https://raw.github.com/markoheijnen/wp-mysqli/master/db.php

You'll need to update your local certs. This blog post looks like it might offer the right direction: http://thenubbyadmin.com/2014/01/29/solving-wget-error-cannot-verify-site-certificate-unable-to-locally-verify-the-issuers-authority/

@onet4
Copy link
Author

onet4 commented Mar 4, 2015

The error is probably with this call:

That particular error is caused by the line accessing github.com but the error "ERROR: cannot verify x's certificate" occurs on every line using wget with SSL in that script including the line accessing wordpress.org.

I downloaded a certification file from here and used the --ca-certificate option of wget and it does not give the error.

wget -nv -O wordpress.tar.gz https://wordpress.org/wordpress-latest.tar.gz --ca-certificate gd-class2-root.crt

I thought this kind of certification issue only occurs on Windows which does not natively support wget. However, this issue seems to be not uncommon among different platforms and applications. What about changing it to use curl instead of wget?

@danielbachhuber
Copy link
Member

#1636 defaults to curl, but hasn't been released yet. You can use the nightly if you'd like: https://github.com/wp-cli/wp-cli/wiki/Alternative-Install-Methods#installing-nightly-via-phar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants