Errors / checked October 9, 2026

curl: (60) SSL certificate problem: unable to get local issuer certificate

The error

Output of a curl call to an https URL when curl could not verify the server's certificate. The text after the colon says why; the common ones are listed below.

Quick fix

  1. "unable to get local issuer certificate": the server is not sending its intermediate certificate, or the machine running curl has an old CA bundle. Test the site with an SSL checker; if the chain is incomplete, fix the server (serve the full chain file). Otherwise update ca-certificates on the client.
  2. "certificate has expired": the server's certificate (or one in its chain) is past its end date. Renew it on the server; nothing on the curl side fixes this.
  3. "self-signed certificate in certificate chain": a private CA or a proxy that inspects TLS. Point curl at that CA with --cacert /path/to/ca.pem.
  4. "no alternative certificate subject name matches target host name": the certificate is for a different name. Call the hostname the certificate was issued for.

Why this happens

Exit code 60 means the peer certificate could not be authenticated with known CA certificates. curl checks the whole chain against the CA bundle on the machine it runs on, so the same URL can pass on your laptop and fail on an old server or in a slim container image.

Source: curl man page: exit codes

Other solutions

  • curl -k (--insecure) makes the error go away by skipping verification. Use it only to confirm the diagnosis, never in a cron job: it also accepts an attacker's certificate.
  • Retrying does not help a certificate error. What helps is finding out the day it starts: a scheduler that logs every run shows the first failed call. RunLater records each run's status and error, so an expired certificate shows up as a failed run in the log instead of a silent cron job.

Check a schedule before you deploy it: the cron expression explainer shows the next 10 run times.

Frequently asked questions

What does curl error 60 mean?

Peer certificate cannot be authenticated with known CA certificates (exit code 60 in the curl man page). The rest of the message gives the reason: expired, self-signed, unknown issuer or wrong host name.

Why does it work in my browser but not with curl?

Browsers can fetch a missing intermediate certificate on their own; curl does not. A server with an incomplete chain therefore works in a browser and fails in curl with "unable to get local issuer certificate".

Is curl -k safe for a cron job?

No. It turns off certificate checks entirely, so the job would send its data to anyone who can intercept the connection. Fix the chain or point curl at the right CA with --cacert.

Have the URL called on schedule, with retries

RunLater calls your URL on a cron schedule or at an exact time, in your timezone, retries failed calls with backoff and logs each response, so a timeout or a 5xx shows up in a log instead of disappearing.

Start a 14-day trialStarter is $15/month for 250 scheduled requests and 25,000 runs. Cancel before day 14 and you pay nothing.

Related errors