6

I'm trying to use Heroku CLI on Mac.

When I try to login to Heroku using Heroku login and give my credentials, I get the below error:

Error: self signed certificate in certificate chain

I have tried uninstalling and reinstalling it several times, but I continue to receive this error.

How can I solve it?

Grant Miller
  • 27,532
  • 16
  • 147
  • 165
Sudipta Nayak
  • 61
  • 1
  • 3

2 Answers2

2

I was also facing issue same issue because of my organization firewall. Solution is to simply download and install organization certs.

  1. Once you download organization specific ".cer" file then convert that file to ".pem" using

    openssl x509 -inform der -in orgCertFile.cer -out certificate.pem

  2. Next, set following variable either as system variable or temp variable in current command line

    export SSL_CERT_FILE=orgCertFile.cer

    export NODE_EXTRA_CA_CERTS=certificate.pem

  3. Finally try logging in using heroku command

    heroku login

Mayur Gite
  • 397
  • 4
  • 16
1

This error usually means you're behind a mitm proxy that isn't configured right. See the docs for details.

Jeff Dickey
  • 5,036
  • 4
  • 28
  • 39