SSL ERRORS
curl: (60): causes and fixes
For an HTTPS request, curl error 60 means peer-certificate verification failed. Its detailed message identifies whether the investigation concerns trust, dates, identity or another verification rule.
What it means
curl can use different TLS backends and trust sources. A command inside a minimal container may fail because its intended CA bundle is absent, while a browser on the host succeeds. Conversely, a browser’s cached intermediate can conceal an incomplete server chain.
What to check
- Run curl -V to record the version and TLS backend.
- Keep the complete verbose error, requested hostname, peer address and CA-file/path information if reported.
- Compare the same request inside the failing runtime with a working environment.
Test the connection
curl -V
curl -Iv --connect-timeout 10 --max-time 20 https://www.example.com/Record the curl version, TLS backend, peer address and full error. In Windows PowerShell, use curl.exe.
How to fix it
- Repair the server chain, expired certificate or hostname mismatch indicated by the detailed message.
- If the environment lacks its CA bundle, install or configure that bundle through the runtime’s normal package and trust management.
- Use --cacert only with a deliberately approved trust file, not an arbitrary certificate copied from the warning.
Check the fix
Repeat the HTTPS request with certificate verification enabled and check curl’s exit status. If TLS succeeds but HTTP returns an error, investigate that response in the application.
Details worth checking
Keep verification enabled during the final test. The -k and --insecure options skip the check that produced error 60 and can conceal an unresolved chain or hostname problem.
Related guides
- Repair missing intermediates and client trust differences
- Diagnose certificate hostname and SNI mismatches
- Fix an expired website SSL certificate