一些解释:
- 墨盒A:nginx、jenkins客户端
- 墨盒 B(jenkins 的静态从站):nginx
- 墨盒 C:詹金斯
我已经将一个盒式磁带从 open shift 设置为 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 导致了这个问题
,所以我什至在他的凭据中添加了公钥,但这并没有帮助..
有什么我遗漏的吗,
这对我来说很奇怪,因为当 jenkins 生成一个从站时它没有问题,
用 openShift 创建一个静态从站应该不难。
感谢您的帮助