oc login使用OpenShift PaaS时,我为工具中的服务器URL提供了什么?
我正在尝试将我的OpenShift Online v2应用程序迁移到v3,遵循从OpenShift迁移中心链接到的PHP应用程序的说明.那个页面说要按照模式运行一些东西oc new-app https://github.com/<github-id>/<repo-name>.git --name=<app-name> -e <ENV_VAR_NAME>=<env_var_value>.在追踪到oc的下载(这不容易)后,我尝试用我的repo URL*运行该命令; 这导致:
$ oc new-app https://USERNAME@bitbucket.org/USERNAME/PROJECTNAME.git --name=PROJECTNAME
error: Missing or incomplete configuration info. Please login or point to an existing, complete config file:
1. Via the command-line flag --config
2. Via the KUBECONFIG environment variable
3. In your home directory as ~/.kube/config
To view or setup config directly use the 'config' command.
Run Code Online (Sandbox Code Playgroud)
不知道什么样的子命令oc config使用,我搜查,发现获得有关CLI开始,这表示使用oc login启动配置过程.但当我运行时,我得到:
Server [https://localhost:8443]:
Run Code Online (Sandbox Code Playgroud)
在使用OpenShift PaaS(即非本地安装)时,我在此处为URL提供了什么?我已经尝试了类似https://openshift.com/的东西和我的网络应用程序的URL,但它们都导致了
error: The server was unable to respond - verify you have provided the correct host and port and that the server is currently running.
Run Code Online (Sandbox Code Playgroud)
*我决定使用Bitbucket代替GitHub; 我不确定这是否不受支持,或者(如果支持的话)我是否应该提供USERNAME@bitbucket.org.
Gya*_*edi 13
它位于Web控制台的正上方.点击(?)右上角用户名旁边的帮助图标.选择'Command Line Tool'从下拉菜单中.
或者,它在URL中:
http://<openshift url>/console/command-line
Run Code Online (Sandbox Code Playgroud)
例如,我在下面的URL中提到:
https://console.starter-ca-central-1.openshift.com/console/command-line
Run Code Online (Sandbox Code Playgroud)
希望能帮助到你.
在 RedHat OpenShift Online Web 控制台中,单击(?)右上角用户名旁边的帮助图标。选择'Command Line Tools'从下拉菜单中。
将出现一个弹出窗口,其中包含“oc - OpenShift 命令行界面 (CLI)”部分,并且有一个Copy Login Command. 点击它,它会带你到一个页面
https://oauth-openshift.apps.ca-central-1.starter.openshift-online.com/oauth/token/display?code=Ge .....
(此时可能会提示您登录 Redhat Portal,如有必要,请执行此操作。)
然后页面将显示文本
显示令牌
点击 Display Token
它将显示类似于此的输出:
使用此令牌登录
oc 登录 --token=... --server= https://api.ca-central-1.starter.openshift-online.com:6443
| 归档时间: |
|
| 查看次数: |
6163 次 |
| 最近记录: |