If your build uses curl with HTTPS urls, you might have started to encounter an error. If so, it may look something like this:
curl: (60) SSL certificate problem: certificate has expired
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
If you are using the CircleCI Linux machine image:
then a simple workaround for this issue is to manually update the ca-certificates package. You can do this in your build, before using curl, like this:
This problem only occurs with the combination of some HTTPS urls (not all) and an older ca-certificates package. If you already update packages with apt-get update that will include the update for ca-certificates as well.
I’m having this issue since yesterday when circleci executes: curl -o- -L https://yarnpkg.com/install.sh.
I’m using the circleci/node:14.16 image. How can I get rid of this error ?
We are also running into the same issue since yesterday for curl -o- -L https://yarnpkg.com/install.sh using the circleci/ruby:2.6.2-stretch image in docker
Manually running sudo apt-get update && sudo apt-get install -y ca-certificates did not fix the issue.
On investigation, it looks as though the CircleCI server running the curl command is able to validate the certificate used by yarnpkg.com, but yarnpkg.com 301 redirects the curl request to classic.yarnpkg.com/install.sh to download the resource. The curl request is unable to validate the certificate for classic.yarnpkg.com.
The certificate used by classic.yarnpkg.com has only been valid since 10 days ago:
On other machines, I am able to successfully use curl to retrieve this resource - @FelicianoTech, is it possible that the CircleCI images are unable to validate the newly valid certificate, even after the manual cert bundle refresh?
I’m also experiencing this issue.
If you add the -k flag to your curl request it will work, although I highly advise against this and hope someone else has a better fix
curl: (60) SSL: no alternative certificate subject name matches target host name 'dl.google.com'
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.```