Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40192

java.io.IOException: Cannot run program "git" (in directory "/home/jenkins/workspace/pipeline"): error=2, No such file or directory

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Blocker Blocker
    • docker-plugin
    • None
    • CoreOS
      Docker Image :evarga/jenkins-slave

      A Docker Pipeline with Cloud>Docker is not able to run a Jenkins pipeline in the Docker container provisioned on a different CoreOS instance. Docker container gets provisioned but build generates the following error.

      {{ERROR: Error cloning remote repo 'origin'
      hudson.plugins.git.GitException: Could not init /home/jenkins/workspace/docker-plugin-pipeline

      Caused by: java.io.IOException: Cannot run program "git" (in directory "/home/jenkins/workspace/docker-plugin-pipeline"): error=2, No such file or directory}}

      Configuring a different PATH for git /usr/bin/git in Configure System does not fix the issue.

          [JENKINS-40192] java.io.IOException: Cannot run program "git" (in directory "/home/jenkins/workspace/pipeline"): error=2, No such file or directory

          Deepak Vohra created issue -
          Deepak Vohra made changes -
          Summary Original: Caused by: java.io.IOException: Cannot run program "git" (in directory "/home/jenkins/workspace/pipeline"): error=2, No such file or directory New:  java.io.IOException: Cannot run program "git" (in directory "/home/jenkins/workspace/pipeline"): error=2, No such file or directory
          Deepak Vohra made changes -
          Environment Original: CoreOS New: CoreOS
          Docker Image :evarga/jenkins-slave
          Kanstantsin Shautsou made changes -
          Component/s Original: github-plugin [ 15896 ]
          Nicolas De Loof made changes -
          Assignee Original: magnayn [ magnayn ] New: Nicolas De Loof [ ndeloof ]
          Huseyin Yurtseven made changes -
          Priority Original: Minor [ 4 ] New: Blocker [ 1 ]
          liu wei made changes -
          Attachment New: image-2018-12-14-21-04-05-085.png [ 45461 ]
          liu wei made changes -
          Attachment New: image-2018-12-14-21-05-41-837.png [ 45462 ]
          liu wei made changes -
          Comment [ *I checked which git and echo $PATH they seem ok, i alse checked echo git --help it shows the help instructions but the error still be there like:*

          !image-2018-12-14-21-04-05-085.png!

          If I don't use pipeline, the git works well.

           

          *After I use pipeline and get* :

          !image-2018-12-14-21-05-41-837.png!

           

          *The git version:*

                    *git version 2.20.0*

                   *centos 7*

            And I install by make configure & make install 

           

          I want use ASK_PASS to git clone src code from private git libary.  The origin git version is git 1.7,  which doesnot support . And I use the latest version,

          Any have the same problem?

           

            ]
          pjdarton made changes -
          Assignee Original: Nicolas De Loof [ ndeloof ]
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            Unassigned Unassigned
            dvohra Deepak Vohra
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: