Question

I'm getting this error, but obviously I'm connected! I entered a ticket with Heroku 15 hours ago but received no response.

C:\>heroku config
Enter your Heroku credentials.
Email: myemail@mydomain
Password (typing will be hidden):
 !    Unable to connect to Heroku API, please check internet connectivity and try again.

$ heroku status
 !    Unable to connect to Heroku API, please check internet connectivity and try again.

I even re-installed Heroku client. I even pushed to Heroku while this problem was happening through Git.

Était-ce utile?

La solution

It was because of a missing certificate authority file. The environment variable was pointing to a file that wasn't there.

SSL_CERT_FILE=C:\ruby200\cacert.pem

I wish it gave an error message.

Autres conseils

I want to offer one more piece of clarification here in case the above answer (which is correct) is still unclear. To fix this issue, look up your "Environment Variables" via start menu. On the bottom, you'll see a list of system varibles. Where you see SSL_CERT_FILE follow the path to see if the value path actually exists.

In my case, I had moved a bunch of files around so it was no longer in the correct place. I found a replacement cacert.pem file and replaced the incorrect value. This fixed the connection issue.

For newbies out there using the cloud9 IDE. It's embarrassing to post this but it might help to refresh the browser (If using cloud9 IDE). Sometimes, Cloud9 has minor issues with connectivity.

This other SO answer solved it for me.

Basically, my heroku remote was missing.

If there isn't a remote branch set up, do heroku git:remote -a my-app-name and it should configure it.

For me, it was because I was using an old version of the Heroku CLI/Toolbelt. Even after running heroku update, it was still stuck at version 3.12.1.

To fix, I just uninstalled that old version, and installed the newest version from: https://devcenter.heroku.com/articles/heroku-cli

When picking up an old laptop I ran into this issue too. There is a bit that pointed me in the right direction at the end of this article: https://devcenter.heroku.com/articles/heroku-cli#uninstalling-the-legacy-heroku-gem

So in my case, heroku sat at /usr/local/heroku instead of /usr/local/bin/heroku.

I ended up executing rm -rf /usr/local/heroku. If you try this too, be sure this is relevant to you, it might make a mess out of things. Ugly solution but problem solved.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top