1

I am trying to hit our enterprise github API endpoint to retrieve the app installation details.

I get the following error while hitting the API from local/postman

Error: Unable to get local issuer certificate.

However, works fine in browser.

I tried adding user-agent as my app name, but to no avail.

How do I fix this ?

freakomonk
  • 574
  • 1
  • 5
  • 15

1 Answers1

1

I usually see that when doing a curl to a server for which I did not add the root CA/intermediate CA.
All I have to do then is reference those CAs (as a bundle file listing both root and intermediate CAs) in ~/.curlrc.
You can get them with an openssl s_client -showcerts -verify 5 -connect yourServer:443 < /dev/null

Those same CAs are generally already registered in the truststore of your browser, which is why it is working fine there.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250