在cmd中执行语句时出错 - cf api https://api.ng.bluemix.net

时间:2017-04-07 17:43:47

标签: ibm-cloud

尝试在命令提示符下执行语句时出现以下错误。

C:\users\Blue mix> cf API https://api.ng.bluemix.net

Setting API endpoint to https://api.ng.bluemix.net...
Request error: Get https://api.ng.bluemix.net/v2/info: http: error connecting to
 proxy http://my.proxyserver.com:8080: dial tcp : lookup my.proxy server.com: GET Address inflow : No such host is known.
TIP: If you are behind a firewall and require an HTTP proxy, verify the HTTPS_proxy environment variable is correctly set. Else, check your network connection.
FAILED

您能否建议我如何解决此问题?

1 个答案:

答案 0 :(得分:0)

看起来你已经配置了https_proxy变量? https://docs.cloudfoundry.org/cf-cli/http-proxy.html

错误消息表明您为代理服务器设置的主机名无法解析为IP地址。

<强>更新

您可以通过ping代理服务器来验证您的计算机是否能够解析代理服务器的主机名,例如

C:\> ping my.proxyserver.com

Ping将报告是否无法将代理主机名解析为IP地址。 E.g。

C:\> ping my.proxyserver.com
Ping request could not find host my.proxyserver.com. Please check the name and try again.

如果无法解析为IP地址,则需要先解决该问题。请参阅此处获取一些提示:https://support.rackspace.com/how-to/modify-your-hosts-file/