Cli: Heroku Login: "Error: self signed certificate in certificate chain"

Created on 26 Sep 2018  Â·  7Comments  Â·  Source: heroku/cli

What is the current behavior?

Currently, I am simply trying to login to heroku, but am having continuous struggles doing so. I keep receiving the error: "Error: self signed certificate in certificate chain". There is not a single command I can run from the CLI.

What is the expected behavior?

I expect to be able to login, but this error keeps on showing up. I have tried creating my own certificate, and have looked tirelessly online. I am running heroku/7.16.0 on a 32-bit Windows 7 computer. I have attached the output. Thanks!

cert_error

Most helpful comment

In Windows 10, follow the steps below:

  1. Open heroku.com on Chrome or Firefox browser and login (or open any other site that uses https (e.g. google.com)).
  2. Right-click the lock and click Certificate to view certificate issuer details.
  3. Open the Certification Path tab.
  4. Choose the first certificate that appears at the top of the list and press the Show Certificate button.
  5. Open the Details tab and click the Copy to File ... button.
  6. Choose base64 encoded X.509 format (* .cer) and click Next button.
  7. Click the Browse button and enter a location and file name. Remember to save with the extension "cer". Example: D: \Users\uendel\Desktop\proxy.cer
  8. Close the windows and open the Windows command prompt and run the following command line (replace the location with the path where you saved the certificate):
    SET NODE_EXTRA_CA_CERTS=D:\Users\uendel\Desktop\proxy.cer
  9. Revert to the old OpenSSL behaviour:
git config --global http.sslBackend "openssl"
git config --global http.sslCAInfo D:\Users\uendel\Desktop\proxy.cer
  1. Login heroku. A tab will open in the browser. Click the Login button.
    heroku login
  2. Verify that the installation was successful by running
    heroku whoami

IMPORTANT: After doing test, set NODE_EXTRA_CA_CERTS in the system environment variables!!!

image

image

All 7 comments

Additionally, I am on a company computer and should be behind a proxy. However, cybersecurity checked and my request is not even hitting the proxy. This should not be a firewall issue either.

See https://devcenter.heroku.com/articles/using-the-cli#using-an-http-proxy

On Wed, Sep 26, 2018 at 12:40 PM dking74 notifications@github.com wrote:

Additionally, I am on a company computer and should be behind a proxy.
However, cybersecurity checked and my request is not even hitting the
proxy. This should not be a firewall issue either.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/heroku/cli/issues/1054#issuecomment-424843881, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AANMfB7OuR0Lw1oPDt9fNag9G3hWr88Oks5ue9gXgaJpZM4W7WLm
.

i read the link. But where to find my ca_cert.pem?

See https://devcenter.heroku.com/articles/using-the-cli#using-an-http-proxy

…

How I can create my ca_cert.pem?

The proxy software will provide its CA cert.

In Windows 10, follow the steps below:

  1. Open heroku.com on Chrome or Firefox browser and login (or open any other site that uses https (e.g. google.com)).
  2. Right-click the lock and click Certificate to view certificate issuer details.
  3. Open the Certification Path tab.
  4. Choose the first certificate that appears at the top of the list and press the Show Certificate button.
  5. Open the Details tab and click the Copy to File ... button.
  6. Choose base64 encoded X.509 format (* .cer) and click Next button.
  7. Click the Browse button and enter a location and file name. Remember to save with the extension "cer". Example: D: \Users\uendel\Desktop\proxy.cer
  8. Close the windows and open the Windows command prompt and run the following command line (replace the location with the path where you saved the certificate):
    SET NODE_EXTRA_CA_CERTS=D:\Users\uendel\Desktop\proxy.cer
  9. Revert to the old OpenSSL behaviour:
git config --global http.sslBackend "openssl"
git config --global http.sslCAInfo D:\Users\uendel\Desktop\proxy.cer
  1. Login heroku. A tab will open in the browser. Click the Login button.
    heroku login
  2. Verify that the installation was successful by running
    heroku whoami

IMPORTANT: After doing test, set NODE_EXTRA_CA_CERTS in the system environment variables!!!

image

image

IMPORTANT: After doing test, set NODE_EXTRA_CA_CERTS in the system environment variables!!!

How do I set the NODE_EXTRA_CA_CERTS in the system environment variables?
Now I'm having this error fatal: unable to access 'https://git.heroku.com/my-app.git/': SSL certificate problem: unable to get local issuer certificate

Was this page helpful?
0 / 5 - 0 ratings