一些解释:
我已经将开放式弹药筒设置为jenkins中的静态奴隶
现在要处理的是我将git推入A然后jenkins开始构建过程
构建过程使用B作为它的奴隶
问题是,当构建过程试图从A的git repo克隆时,它会失败:
Started by user Jenkins Admin
Building remotely on nginxbuild (nginx-build) in workspace /var/lib/openshift/(UUID)/app-root/runtime/repo
Checkout:repo / /var/lib/openshift/(UUID)/app-root/runtime/repo - hudson.remoting.Channel@afdc78:nginxbuild
Using strategy: Default
Last Built Revision: Revision d50c6e11d2c15015db1ab9665c6dcce758dddd7d (origin/HEAD, origin/master)
Checkout:repo / /var/lib/openshift/(UUID)/app- root/runtime/repo - hudson.remoting.LocalChannel@910502
Wiping out workspace first.
Cloning the remote Git repository
Cloning repository origin
ERROR: Error cloning remote repo 'origin' : Could not clone ssh://(UUID)@nginx-domain.rhcloud.com/~/git/nginx.git
ERROR: Cause: Error performing command: git clone --progress -o origin ssh://(UUID)@nginx-domain.rhcloud.com/~/git/nginx.git /var/lib/openshift/(UUID)/app-root/runtime/repo
Command "git clone --progress -o origin ssh://(UUID)@nginx-domain.rhcloud.com/~/git/nginx.git /var/lib/openshift/(UUID)/app-root/runtime/repo" returned status code 128: Cloning into '/var/lib/openshift/(UUID)/app- root/runtime/repo'...
Host key verification failed.
fatal: Could not read from remote repository.
所以从谷歌搜索我所理解的是它与墨盒没有彼此公钥有关,所以使用ssh我使用ssh-keygen并为A创建了一个公钥,和B
我把它们放在openShift帐户控制面板的管理面板中
没有解决问题..
所以我试图将它手动添加到墨盒但是..我没有任何权限访问.ssh文件夹
我也认为用户Jenkins Admin可能导致了问题
所以我甚至在他的凭证中加入了公钥,但这没有帮助..
是否有一些我缺少的东西,
这对我来说很奇怪,因为当詹金斯生成一个奴隶时,它没有任何问题,
使用openShift创建静态从站应该不会那么困难。
感谢您的帮助