詹金斯用github返回了状态码128 [英] Jenkins returned status code 128 with github

查看:759
本文介绍了詹金斯用github返回了状态码128的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

with github command i have

我与github的连接没问题,但是jenkins我有这个错误。

ssh -T git@github.com Hi (MyName)! You've successfully authenticated, but GitHub does not provide shell access.

my connection with github is ok no problem ,but with jenkins i have this error

为什么publickey
我在TomCat7下使用jenkins / ubuntu 12
请帮助解决方案

ERROR: Error cloning remote repo 'origin' : Could not clone git@github.com:Name-MysRepo/MyRepo.git hudson.plugins.git.GitException: Could not clone git@github.com:Name-MysRepo/MyRepo.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.act(FilePath.java:904) at hudson.FilePath.act(FilePath.java:877) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101) at hudson.model.AbstractProject.checkout(AbstractProject.java:1369) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581) at hudson.model.Run.execute(Run.java:1575) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:241) Caused by: hudson.plugins.git.GitException: Command "git clone --progress -o origin git@github.com:Name-MysRepo/MyRepo.git /root/.jenkins/jobs/TestKRGDAOV01/workspace" returned status code 128: stdout: Cloning into '/root/.jenkins/jobs/TestKRGDAOV01/workspace'... stderr: Permission denied (publickey). fatal: The remote end hung up unexpectedly


why this problem with publickey I use jenkins under TomCat7 / ubuntu 12 help please

推荐答案


This error:


stderr:Permission denied(publickey)。致命:远程端意外挂起

stderr: Permission denied (publickey). fatal: The remote end hung up unexpectedly

表示Jenkins正试图用错误的ssh密钥连接到github。

indicates that Jenkins is trying to connect to github with the wrong ssh key.

您应该:

You should:


  1. 确定jenkins运行的用户,例如。 'build'或'jenkins'
  2. 在试图执行克隆的jenkins主机上登录 - 也就是说,如果节点实际正在执行构建,则不要登录到主节点。 / li>
  3. 试试你的ssh到github - 如果失败了,那么你需要添加正确的密钥到/.ssh

这篇关于詹金斯用github返回了状态码128的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆