git ENOTFOUND: getaddrinfo ENOTFOUND api.heroku.com api.heroku.com:443 heroku 创建错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41788740/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ENOTFOUND: getaddrinfo ENOTFOUND api.heroku.com api.heroku.com:443 Error for heroku create
提问by aircraft
My steps are below:
我的步骤如下:
- Download the
heroku-osx.pkg
, and installed it. $ heroku login
with my account and password- cloned the ruby-getting-started:
$ git clone https://github.com/heroku/ruby-getting-started.git
- But when I run
$ heroku create
in my Terminal.
- 下载
heroku-osx.pkg
,并安装它。 $ heroku login
用我的账号和密码- 克隆了 ruby-getting-started:
$ git clone https://github.com/heroku/ruby-getting-started.git
- 但是当我
$ heroku create
在我的终端中运行时。
Reports the error:
报告错误:
Creating app... !
? ENOTFOUND: getaddrinfo ENOTFOUND api.heroku.com api.heroku.com:443
创建应用程序...!
? ENOTFOUND: getaddrinfo ENOTFOUND api.heroku.com api.heroku.com:443
I have find the related question in SO:
我在 SO 中找到了相关问题:
- I got error while using "git push heroku master"
- Hibernate unable to create schema automatically on Heroku postgres
But they are not when execute $ heroku create
comes out the error.
但是当执行$ heroku create
出现错误时它们不是。
回答by the21st
The same was happening to me on Mac OS X 10.12.6 in iTerm2 3.1.5
我在 iTerm2 3.1.5 中的 Mac OS X 10.12.6 上也发生了同样的事情
Restarting iTerm solved the issue for me.
重新启动 iTerm 为我解决了这个问题。
回答by aircraft
Carelessly, I don't know why, I tried several times of :
不小心,我不知道为什么,我尝试了几次:
$ heroku create
It create succeed, with the logs:
它创建成功,日志:
Creating app... done, ? still-harbor-32209
https://still-harbor-32209.herokuapp.com/ |
https://git.heroku.com/still-harbor-32209.git
So, I think is because the block of network(China have the GFW) caused the issue, then test several times will solve it.
所以,我认为是因为网络阻塞( CN 有GFW)导致了这个问题,然后测试几次就会解决它。
回答by Joseph
It means that the connection between api.heroku.com
with a port of 443
and to your PC failed and results to shutdown. Thus retrying the command will succeeds.
这意味着api.heroku.com
与443
您的 PC的端口之间的连接失败并导致关闭。因此重试该命令将成功。
回答by Wilfred Ruck
You may not be connected to the internet. Make sure to check your connection as it is required to complete this command.
您可能没有连接到互联网。确保检查您的连接,因为它是完成此命令所必需的。
回答by Joe
I experienced the same issue recently. To debug this:
我最近遇到了同样的问题。要调试这个:
1) I tried restarting my terminal entirely CMD+Q
, but still hit the timeout issue
1)我尝试完全重新启动我的终端CMD+Q
,但仍然遇到超时问题
2) I ran a whois
on my-heroku-app.com
and that command also timed out, even though I could connect to it through my browser
2)我跑了whois
就my-heroku-app.com
和该命令也超时,虽然我可以通过我的浏览器连接到
3) I disconnected my VPN and ran a whois
command. This fixed the issue
3) 我断开了我的 VPN 并运行了一个whois
命令。这解决了问题
After reconnecting my VPN, everything worked smoothly. Not sure what caused the hiccup, but I hope these steps help for anyone trying to debug this.
重新连接我的 VPN 后,一切顺利。不确定是什么导致了打嗝,但我希望这些步骤对任何试图调试它的人都有帮助。
回答by fill_J
I had a similar issue. my OS is windows, I solve this problem by restarting my command line and running the command all over and everything worked fine
我有一个类似的问题。我的操作系统是 windows,我通过重新启动命令行并运行命令来解决这个问题,一切正常
回答by Nicholas Mberev
The problem for me was network connection, by checking and re-establishing connection, it worked perfectly fine
我的问题是网络连接,通过检查和重新建立连接,它工作得很好