【发布时间】:2012-08-25 11:43:26
【问题描述】:
我是Jenkins 的新手,从GitHub 克隆存储库时出现以下错误。
我尝试在这里搜索所有相关问题,但可以找到确切的 stacktstrace 和答案。
我正在尝试克隆需要用户名和密码的存储库,我在我的作业的作业配置设置中提供SSH://repository-path。我还没有完成任何与 .ssh 相关的设置,因为这似乎与 GIT 存储库的安全问题不同。
我无法弄清楚 Jenkins 试图执行什么评论,它没有发现哪个文件/目录毫无头绪。
这是我在 Jenkins 工作中的确切堆栈跟踪:
原因:java.io.IOException:无法运行程序:尝试错误 确定 git 版本:执行命令时出错:--version 假设 1.6 错误:克隆远程仓库“myRE”时出错:无法克隆 git@github.com:myORG/RVL.myProj.git hudson.plugins.git.GitException:无法克隆 git@github.com:myORG/RVL.myProj.git 在 hudson.plugins.git.GitAPI.clone(GitAPI.java:268) 在 hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1122) 在 hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1064) 在 hudson.FilePath.act(FilePath.java:842) 在 hudson.FilePath.act(FilePath.java:824) 在 hudson.plugins.git.GitSCM.checkout(GitSCM.java:1064) 在 hudson.model.AbstractProject.checkout(AbstractProject.java:1256) 在 hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589) 在 jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) 在 hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494) 在 hudson.model.Run.execute(Run.java:1502) 在 hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) 在 hudson.model.ResourceController.execute(ResourceController.java:88) 在 hudson.model.Executor.run(Executor.java:236) 原因:hudson.plugins.git.GitException:执行命令时出错:clone -o RVL.myProj git@github.com:myORG/RVL.myProj.git /var/lib/jenkins/jobs/myProj/workspace 在 hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:862) 在 hudson.plugins.git.GitAPI.access$000(GitAPI.java:40) 在 hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:264) 在 hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:244) 在 hudson.FilePath.act(FilePath.java:842) 在 hudson.FilePath.act(FilePath.java:824) 在 hudson.plugins.git.GitAPI.clone(GitAPI.java:244) ... 13 更多 原因:java.io.IOException: Cannot run program "": error=2, No such file or directory 在 java.lang.ProcessBuilder.start(未知来源) 在 hudson.Proc$LocalProc.(Proc.java:244) 在 hudson.Proc$LocalProc.(Proc.java:216) 在 hudson.Launcher$LocalLauncher.launch(Launcher.java:709) 在 hudson.Launcher$ProcStarter.start(Launcher.java:338) 在 hudson.Launcher$ProcStarter.join(Launcher.java:345) 在 hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:843) ... 19 更多 原因:java.io.IOException: error=2, No such file or directory 在 java.lang.UNIXProcess.forkAndExec(本机方法) 在 java.lang.UNIXProcess.(未知来源) 在 java.lang.Pro
【问题讨论】:
-
如果你在 Jenkins master 的命令行中输入“git --version”会发生什么?这看起来像你没有安装 git。
-
看起来 Jenkins 的 GIT 配置有问题,给出了 GIT 的完整路径,而不是只有“git”(jenkins 建议)