ERROR: cannot verify ghost.org certificate


If you are trying to download Ghost and get the following error:

ERROR: The certificate of ‘ghost.org’ is not trusted.
ERROR: The certificate of ‘ghost.org’ hasn't got a known issuer.

or sometimes this one

ERROR: cannot verify ghost.org's certificate, issued by /C=BE/O=GlobalSign nv-sa/CN=GlobalSign Organization
Validation CA - G2:
Unable to locally verify the issuer's authority.
ERROR: certificate common name ssl2554.cloudflare.com doesn't match requested host name ghost.org.
To connect to ghost.org insecurely, use --no-check-certificate.
Unable to establish SSL connection.

Both of these are typically caused when using wget https://ghost.org/zip/ghost-latest.zip to download Ghost.There are a couple ways around this.
You can have wget not check the certificate and download the file:

wget --no-check-certificate https://ghost.org/zip/ghost-latest.zip

Ghost Download - wget No Certificate Check

Or, if you don't want to skip over the certificate, you can use the curl command instead of wget:

curl -L -O https://ghost.org/zip/ghost-latest.zip

Ghost Download - curl

We typically use the curl method, but either way should work to fix the download error