我是一个OpenShift新手,我试图从一个私人BitBucket存储库部署一个Rails应用程序到Openshift NextGen。我跟着this page,并在生成的ssh密钥给BitBucket。部署一个ssh仓库到Openshift NextGen
现在的问题是,根据该页面,你必须以与
oc patch buildConfig <app> -p '{"spec":{"source":{"sourceSecret":{"name":"sshsecret"}}}}'
为它分配BuildConfig对象在最后一步创建OpenShift的应用程序,所以在此之前,我跑的命令
oc new-app --name=<app> [email protected]:<username>/<repository>
创建托管在BitBucket存储库中的Rails应用程序。但是,如果我跑oc status
,看来该应用程序未能建立:
bc/<app> source builds ssh://[email protected]/<username>/<repository> on openshift/ruby:2.3
build #1 failed 47 minutes ago
deployment #1 waiting on image or update
Errors:
* build/<app>-1 has failed.
我这么想吗?
编辑: oc logs build/<app>-1
显示以下输出。
Pulling image "registry.ops.openshift.com/rhscl/[email protected]:d89fc0753fbace518d433f3a995149d70fef69be06a4ce350745277a8ac68e91" ...
Pulling image "registry.ops.openshift.com/rhscl/[email protected]:d89fc0753fbace518d433f3a995149d70fef69be06a4ce350745277a8ac68e91" ...
Cloning "ssh://[email protected]/<username>/<repository>.git" ...
error: build error: Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
编辑2:我通过连接到oc中的GitHub ssh存储库来重现问题。同样的过程,我上传了我的SSH公钥到GitHub,并且无法构建相同的错误。因此,到目前为止,它不再是与BitBucket或GitHub相关的问题,必须有一些与OpenShift或Git识别密钥的方式有关,即使不是我的机器...
编辑3:I我想指出oc patch buildConfig <app> -p '{"spec":{"source":{"sourceSecret":{"name":"sshsecret"}}}}'
这个命令没有任何价值,因为我在创建应用程序后运行它,然后立即用oc start-build --from-build=<app>-1
重建应用程序,但它再次失败,结果相同。我也不确定前面的命令是否正确重建应用程序。
任何帮助将不胜感激,在此先感谢。
在执行'OC原木建造/ APP-1' – thisguy123
'拉形象“registry.ops.openshift.com/rhscl/[email protected]:d89fc0753fbace518d433f3a995149d70fef69be06a4ce350745277a8ac68e91”你得到了什么? 拉图像“registry.ops.openshift。COM/rhscl /红宝石23 rhel7 @ SHA256:d89fc0753fbace518d433f3a995149d70fef69be06a4ce350745277a8ac68e91" ...... 克隆 “SSH://[email protected]// git的” ... 错误:建立自己的错误:主机密钥验证失败。 fatal:无法从远程存储库读取 请确保您拥有正确的访问权限 并存在存储库。' –
Simon