curl not working SSL

Posted March 23, 2020 17.1k views


I am trying to check an API with curl command and I am getting the below;

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

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.

I tried to install the cacert.pam as stated by the webpage above however no luck. Is there anything else I can do to fix this issue?

thank you

edited by MattIPv4

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi @stavroschrysanthou,

You can add the -k switch/attribute somewhere before the url. For example

curl -k

Please note you’ll need to replace with the actual URL you want to access. If you need more information, you can check the manual for curl

man curl

If you get to the -k attribute you’ll see something like

-k, --insecure (TLS) By default, every SSL connection curl makes is verified to be secure. This option allows curl to proceed and operate even for server connections otherwise considered insecure.

The server connection is verified by making sure the server's certificate contains the right name and verifies successfully using the cert store.

See this online resource for further details:

You can also the –proxy-insecure and –cacert attributes.