2

我在 bitbucket 中有存储库,我想用运行 jenkins 作为服务的 Cloudbees 配置这个存储库

我的问题是当我尝试运行 Jenkins 构建时收到此错误消息

克隆远程 repo 'origin' 时出错:无法克隆 ssh://myRepo@bitbucket.org/myRepo/app1.git hudson.plugins.git.GitException:无法克隆 ssh://myRepo@bitbucket.org/myRepo/app1 .git at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:219) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1001) at hudson.plugins.git.GitSCM$2.invoke (GitSCM.java:942) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2236) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java: 48) 在 hudson.remoting.Request$2.run(Request.java:326) 在 hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 在 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java :334) 在 java.util.concurrent。FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang .Thread.run(Thread.java:722) 引起:hudson.plugins.git.GitException:命令“git clone --progress -o origin ssh://myRepo@bitbucket.org/myRepo/app1.git /scratch/ jenkins/workspace/myRepo 自动化构建”返回状态码 128:标准输出:克隆到 '/scratch/jenkins/workspace/myRepo 自动化构建'...GitException:命令“git clone --progress -o origin ssh://myRepo@bitbucket.org/myRepo/app1.git /scratch/jenkins/workspace/myRepo 自动化构建”返回状态码 128:stdout:克隆到 '/scratch /jenkins/workspace/myRepo 自动化构建'...GitException:命令“git clone --progress -o origin ssh://myRepo@bitbucket.org/myRepo/app1.git /scratch/jenkins/workspace/myRepo 自动化构建”返回状态码 128:stdout:克隆到 '/scratch /jenkins/workspace/myRepo 自动化构建'...

标准错误:警告:将 'bitbucket.org,207.223.240.182' (RSA) 永久添加到已知主机列表中。权限被拒绝(公钥)。致命:远端意外挂断

我认为问题在于我需要将 bitbucket 添加到“已知主机列表”中,但我不知道如何在托管在 Cloudbees 服务器中的 Jenkins 上执行此操作。

4

1 回答 1

3

转到 /configure,您应该会在配置列表中看到 CloudBees SSH 密钥。将其添加到您的 BitBucket 存储库的密钥列表中,以使 Jenkins 可以访问该存储库。

于 2013-03-25T22:53:49.127 回答