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

Regression: git < 1.6.2 not supported anymore (failing clone due to existing workspace dir)

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Jenkins 1.511 (git plugin 1.3.0, git client plugin 1.0.5) doesn't support git < 1.6.2 anymore since older git versions don't support cloning into existing directories (even if empty!):

      Last Built Revision: Revision <SHA1> (origin/master)
      Cloning the remote Git repository
      Cloning repository <myrepo-url>.git
      git --version
      git version 1.5.6.5
      ERROR: Error cloning remote repo 'origin' : Could not clone <myrepo-url>.git
      [...]
      stderr: fatal: destination directory '/home/jenkins/workspace/<build-workspace>' already exists.
      
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:773)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:217)
      	... 12 more
      Trying next repository
      ERROR: Could not clone repository
      

      Something seems to have changed in the build process lately as Jenkins 1.502 doesn't have this problem. It seems the workspace is created before cloning which seemingly wasn't the case in (at least) 1.502.

        Attachments

          Activity

          Hide
          brevilo Oliver Bock added a comment -

          The git clone enhancement was added in 55892d2 and got integrated in git 1.6.2.

          Show
          brevilo Oliver Bock added a comment - The git clone enhancement was added in 55892d2 and got integrated in git 1.6.2.
          Hide
          owenmehegan Owen Mehegan added a comment -

          I have this problem too. I upgraded the Jenkins Git Plugin from 1.1.22 to 1.4.0 and this broke. I have git version 1.5.6.5.

          Show
          owenmehegan Owen Mehegan added a comment - I have this problem too. I upgraded the Jenkins Git Plugin from 1.1.22 to 1.4.0 and this broke. I have git version 1.5.6.5.
          Hide
          eleba Eberhard Leba added a comment -

          Jenkins 1.3.3 , Git plugin 1.3.0
          Got the same problem on one of three build systems running in a matrix project.
          Each build slave has a different linux distro (RHEL6, SLES11, debian squeeze)
          It is failing on SLES11 x86_64 and succeeds on the other two.
          The target directory (work space) exists and is empty (no .git directory in it).
          Workaround: remove target directory, do manual git clone into it and run the Jenkins build again. Wipe out is turned off BTW.

          Show
          eleba Eberhard Leba added a comment - Jenkins 1.3.3 , Git plugin 1.3.0 Got the same problem on one of three build systems running in a matrix project. Each build slave has a different linux distro (RHEL6, SLES11, debian squeeze) It is failing on SLES11 x86_64 and succeeds on the other two. The target directory (work space) exists and is empty (no .git directory in it). Workaround: remove target directory, do manual git clone into it and run the Jenkins build again. Wipe out is turned off BTW.
          Hide
          ndeloof Nicolas De Loof added a comment -

          Any reason you run such an old version of git ?

          Show
          ndeloof Nicolas De Loof added a comment - Any reason you run such an old version of git ?
          Hide
          owenmehegan Owen Mehegan added a comment -

          It is the default version shipped with Debian Lenny, which we still have to build for. I was able to upgrade, but it seems like the breakage could be avoided. Maybe no one cares

          Show
          owenmehegan Owen Mehegan added a comment - It is the default version shipped with Debian Lenny, which we still have to build for. I was able to upgrade, but it seems like the breakage could be avoided. Maybe no one cares
          Hide
          brevilo Oliver Bock added a comment - - edited

          Yep, same here. We have to build stuff on a number of legacy systems where git versions >= 1.6.2 might not be, well, aren't available.

          Show
          brevilo Oliver Bock added a comment - - edited Yep, same here. We have to build stuff on a number of legacy systems where git versions >= 1.6.2 might not be, well, aren't available.
          Hide
          ndeloof Nicolas De Loof added a comment -

          git 1.6.2 is pretty old. Even for exotic build servers, installing a recent git version is not such a big deal. As an alternative, git-plugin 2.0 offers JGit support

          Show
          ndeloof Nicolas De Loof added a comment - git 1.6.2 is pretty old. Even for exotic build servers, installing a recent git version is not such a big deal. As an alternative, git-plugin 2.0 offers JGit support

            People

            Assignee:
            ndeloof Nicolas De Loof
            Reporter:
            brevilo Oliver Bock
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: