Search code examples
sslherokucertificatefirewallheroku-cli

Heroku CLI error: unable to get local issuer certificate


I am behind in my company's firewall. We use a certificate file *.crt provided from our company to access SSL enabled web sites.

So I am getting unable to get local issuer certificate error when using heroku login.

I am using Windows 10 and Heroku CLI 7.14.1 and tried adding HEROKU_SSL_VERIFY=disable and SSL_CERT_FILE=C:\certificate.crt as environment variable but no success.

How can I solve that?

screenshot


Solution

  • Solved from https://devcenter.heroku.com/articles/using-the-cli

    Add an environment variable as NODE_EXTRA_CA_CERTS that points to the certificate.

    For Windows: set NODE_EXTRA_CA_CERTS=C:\path\to\ca_cert.pem or .crt

    For Linux: export NODE_EXTRA_CA_CERTS=/path/to/ca_cert.pem