2012-08-30 7 views
22

私はJenkinsに新しく、GitHubからリポジトリを複製中に次のエラーが発生しています。gitHubからクローン作成中にJenkinsがエラーを起こしました

ここで関連するすべての問題を検索しようとしましたが、正確なstacktstraceと回答が見つかりました。

ユーザー名とパスワードが必要なリポジトリを複製しようとしていますが、自分のジョブのジョブ構成設定でSSH://リポジトリパスを提供しています。 .ssh関連の設定はまだ行っていませんが、GITリポジトリのセキュリティ問題とは異なる問題があるようです。

ジェンキンスが実行しようとしているコメント、どのファイル/ディレクトリが無名なのかわかりませんでした。ここで

はジェンキンスジョブから私の正確なスタックトレースです:

Caused by: java.io.IOException: Cannot run program: Error trying to determine the git version: Error performing command: --version Assuming 1.6 ERROR: Error cloning remote repo 'myRE' : Could not clone [email protected]:myORG/RVL.myProj.git hudson.plugins.git.GitException: Could not clone [email protected]:myORG/RVL.myProj.git at hudson.plugins.git.GitAPI.clone(GitAPI.java:268) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1122) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1064) at hudson.FilePath.act(FilePath.java:842) at hudson.FilePath.act(FilePath.java:824) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1064) at hudson.model.AbstractProject.checkout(AbstractProject.java:1256) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494) at hudson.model.Run.execute(Run.java:1502) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Caused by: hudson.plugins.git.GitException: Error performing command: clone -o RVL.myProj [email protected]:myORG/RVL.myProj.git /var/lib/jenkins/jobs/myProj/workspace at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:862) at hudson.plugins.git.GitAPI.access$000(GitAPI.java:40) at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:264) at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:244) at hudson.FilePath.act(FilePath.java:842) at hudson.FilePath.act(FilePath.java:824) at hudson.plugins.git.GitAPI.clone(GitAPI.java:244) ... 13 more Caused by: java.io.IOException: Cannot run program "": error=2, No such file or directory at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.(Proc.java:244) at hudson.Proc$LocalProc.(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:709) at hudson.Launcher$ProcStarter.start(Launcher.java:338) at hudson.Launcher$ProcStarter.join(Launcher.java:345) at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:843) ... 19 more Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(Unknown Source) at java.lang.Pro

+0

ジェンキンスマスターのコマンドラインで "git --version"と入力するとどうなりますか? gitをインストールしていないようです。 – CIGuy

+1

JenkinsのGIT設定に問題があるように見えますが、gitだけでなくGITのフルパスを与えました(ゲンキンズの提案) – Kaunteya

答えて

42

私は同じ問題が発生し、固定:)

のgitのパスを設定するには、2つの方法があります。

  1. ジェンキンスマスター上

    を。 Jenkins Systemの設定を入力してください(Jenkins - > Manage Jenkins - > Configure System)

    b。 Gitのアイテムを見つけて、gitのインストールを設定しジェンキンススレーブ

  2. (ジェンキンスマスターのGitのパスを指定します)。 Jenkins Slaveの設定を入力してください

    b。 "Tool Locations"チェックボックスをチェックし、Jenkins Slave上のgitのパスを指定します。

私の状況では、私はJenkinsマスターにアクセスする特権を持っていません。だから私はgitをJenkins Slaveにインストールし、それをJenkins SlaveのConfigureに追加します。

+2

+1、非常に良い答えです。ソリューション#2は私のためにうまくいきました。 – Jonik

+0

私の場合、git pathオプションはManage Jenkins - > Global Tool Configurationにありました –

3

これは私が回避策を掲示場所JENKINS-16523を参照して、バグのようです。

+0

Martinさんに最新情報をお寄せください! – Kaunteya

2

私は同じ問題を抱えました。

私は、個々のジョブ「/var/lib/jenkins/jobs/job_name/config.xml」でGitの設定の混合物に気づいた:

[[email protected] jobs]# find . -maxdepth 2 -name  config.xml|xargs grep '<gitTool>' 
./job1/config.xml: <gitTool>git</gitTool> 
./job2/config.xml: <gitTool>Default</gitTool> 
./job3/config.xml: <gitTool>git</gitTool> 
./job4/config.xml: <gitTool>Default</gitTool> 

は、だから私はgitToolの名前を固定し、ジェンキンスを再起動します。 gitの設定が正しくなく、gitの変更がすべてのジョブに反映されていないようです。

また、genの設定は、JenkinsのWebfaceの設定と設定で.xmlファイルが異なることに注意してください!

0

私は新しいJOBを作成した後、私はRestrict where this project can be runの下で、それはLabel Expressionにスレーブネーム(GITとともにインストール)を補正する固定、同じ問題に出くわしました。