我在OpenShift V3上设置了一个帐户,现在我正在尝试使用 oc CLI进行连接。我使用与Web控制台相同的凭据,但无法登录,收到以下错误消息:
> oc login
Authentication required for https://api.starter-us-east-1.openshift.com:443 (openshift)
Username: my_login
Password:
error: The server was unable to respond - verify you have provided the correct host and port and that the server is currently running.
答案 0 :(得分:3)
问题是您没有指定登录目的地。 创建项目(例如Node.js)后,OpenShift提供连接凭据,您必须使用才能登录。
基本上,它是您在OpenShift的API主持人。
例如:
oc login https://api.starter-us-west-2.openshift.com
P.S。您可以在Builds
→%YOUR_BUILD%
→Configuration
,Triggers
→Generic Webhook URL
或GitHub Webhook URL
下找到正确的登录网址。
答案 1 :(得分:0)
oc login YOUR_URL -u USER -p ADMIN
此cmd可能有帮助。