Unable to connect to Heroku API, please check internet connectivity and try again

非 Y 不嫁゛ 提交于 2019-12-18 19:17:15

问题


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.


回答1:


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.




回答2:


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.




回答3:


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.




回答4:


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.



来源:https://stackoverflow.com/questions/22276121/unable-to-connect-to-heroku-api-please-check-internet-connectivity-and-try-agai

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!