我在 Ec2 上使用基本的 amazon ami linux-我已经安装了 jenkins,但是当我从 github 中提取 repo 时,出现以下错误:
Building in workspace /var/lib/jenkins/workspace/build social
Checkout:build social / /var/lib/jenkins/workspace/build social - hudson.remoting.LocalChannel@5c7b21b
Using strategy: Default
Cloning the remote Git repository
Cloning repository origin
ERROR: Error cloning remote repo 'origin' : Could not clone git@github.com:adulion/.git
hudson.plugins.git.GitException: Could not clone git@github.com:adulion/.git
at hudson.plugins.git.GitAPI.clone(GitAPI.java:245)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1117)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1059)
at hudson.FilePath.act(FilePath.java:832)
at hudson.FilePath.act(FilePath.java:814)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1059)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1218)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:581)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:470)
at hudson.model.Run.run(Run.java:1421)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: hudson.plugins.git.GitException: Command "git clone --progress -o origin git@github.com:adulion/.git /var/lib/jenkins/workspace/build social" returned status code 128:
stdout: Cloning into /var/lib/jenkins/workspace/build social...
stderr: Host key verification failed.
fatal: The remote end hung up unexpectedly
我已经为安装 jenkins 的当前用户生成了一个密钥,并设法使用 git 命令行克隆了 repo,但 jenkins 不能。
我已将 ~/.ssh 文件复制到 /var/lib/jenkins/.ssh
我已将 github 添加到已知主机,但我已经用完了可以尝试的解决方案。有人知道我哪里出错了吗?有没有办法让詹金斯显示它正在使用的公钥,如果它使用正确的公钥我可以调试?
我删除了 repo 的名称,因为它是一个私人 repo