Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Certificate signed by unknown authority #2018

Open
prvsousa opened this issue Sep 29, 2016 · 20 comments
Open

Certificate signed by unknown authority #2018

prvsousa opened this issue Sep 29, 2016 · 20 comments

Comments

@prvsousa
Copy link

I'm trying to make the login in heroku but I get this:

$ heroku login
Enter your Heroku credentials.
Email: xxx@gmail.com
Password (typing will be hidden):
 ▸    Post https://api.heroku.com/login: x509: certificate signed by unknown authority

I already try to generate a ssl certificate but it cannot solve the problem. I don't know if it is problem or not of the ssl.

Can anyone help me with this?

Thank's in advance.

@jdx
Copy link
Contributor

jdx commented Sep 29, 2016

Are you behind a proxy? Make sure you follow the proxy instructions here: https://devcenter.heroku.com/articles/using-the-cli

@prvsousa
Copy link
Author

▸ Post https://api.heroku.com/login: http: error connecting to proxy https://proxy.server.com:portnumber: dial tcp: unknown port tcp/portnumber

After the export, I got this!

@jdx
Copy link
Contributor

jdx commented Sep 29, 2016

I don't know what your proxy server is, you'll have to ask your system administrator.

@prvsousa
Copy link
Author

prvsousa commented Sep 29, 2016

Oh sorry, I thought that it was for heroku. I don't have proxy, I'm using direct connection.

The error is: Post https://api.heroku.com/login: x509: certificate signed by unknown authority when I make "heroku login"

@jdx
Copy link
Contributor

jdx commented Sep 29, 2016

That error means the CLI isn't recognizing api.heroku.com as a legitimate host. Usually this happens because there is a MITM proxy that is intercepting the traffic and altering it. Something is between your internet and our servers that is causing it to happen.

@prvsousa
Copy link
Author

But for example, I can't make heroku login on bash on ubuntu on windows but in Ubuntu, I can make the login! I don't understand the difference of connection between the both systems in same device.

@jdx
Copy link
Contributor

jdx commented Sep 29, 2016

well the CLI uses its own certs, you might have a root certificate that bypasses our SSL cert (which I hope you don't), but if that is the case, you can set the certs with SSL_CERT_DIR or SSL_CERT_FILE I think.

@prvsousa
Copy link
Author

I try this but without success :s

@kartiknagappa
Copy link

This is going to sound stupid but I had the same problem and spent several hours trying to figure out what was going on. In the end, I shutdown/restarted my mac and it started working. Gah!

@thirota
Copy link

thirota commented Dec 17, 2016

I encountered same error on Mac Yosemite and Sierra.
In my case, I could login after turning off my AntiVirus software(Kaspersky Internet Security)...

@houssem-yahiaoui
Copy link

I've encountered the same problem but was the solution for my situation (running macOS Sierra) was going in sudo mode.

@emilyemoss
Copy link

emilyemoss commented Jan 20, 2017

Similar issue after installing heroku via homebrew. Running heroku update and then heroku login a second time resolved the issue for me.

@DrFrolla
Copy link

Mac OS 10.12.2 Sierra + antivirus Kaspersky...
disabling the antivirus everything works correctly

@alxpck
Copy link

alxpck commented Feb 2, 2017

I had a similar issue in Sierra 10.12.2. Restarting iTerm2 did the trick for me.

@ransombriggs
Copy link
Contributor

@alxpck @DrFrolla @emilyemoss @houssem-yahiaoui @thirota @patricia93sousa We were waiting on the 1.8 release of golang to get this fix, but saw that it was backported to the 1.7 and released as part of the 1.7.5 release. Could you heroku update and verify that you have heroku-cli/5.6.17-bee0f80 (darwin-amd64) go1.7.5 and let me know if you see this error again?

golang/go@3357daa

@ransombriggs
Copy link
Contributor

Note: heroku update may not work because of this error, but this error is intermittent, so either you can try again or run the installer from https://cli.heroku.com to fix this error.

@alxpck
Copy link

alxpck commented Feb 6, 2017

@ransombriggs I just checked heroku version and I'm already at heroku-cli/5.6.17-bee0f80 (darwin-amd64) go1.7.5 as I was at the time of the error.

Weirdly, all I had to do was quit my terminal (iTerm2) session and launch a new one and it started working.

@ransombriggs
Copy link
Contributor

@alxpck the heroku CLI automatically updates in the background so it may have auto updated you after you saw the error four days ago without you manually requesting an update. Let me know if you see the error again so that I can continue to investigate this (I upgraded to Sierra to debug this error and have not seen the error since updating heroku, but since it was an intermittent error I am not completely sure it is fixed)

@babzcraig
Copy link

babzcraig commented Jul 20, 2017

Sudo worked for me. I think it has something to do with the root certificate bypassing the SSL cert. I am using a mac on which I am not the root user even though I have admin privileges.

@kartiknagappa Not stupid at all. I took your advice.

@jzcfamily
Copy link

git 中heroku login 登录不上,总是报错:
▸ HTTP Error: https://api.heroku.com/login 400 Bad Request
▸ Invalid response from API.
▸ HTTP 400
▸ {xxxxxxxxxxxx xxxxxxxxxxx}

▸ Are you behind a proxy?
https://devcenter.heroku.com/articles/using-the-cli#using-an-http-proxy

▸ Post https://api.heroku.com/login: http: error connecting to proxy http://proxy.server.com:portnumber: dial tcp: unknown port tcp/portnumber

这两种错误。怎么能解决呢?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests