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

An invalid git reference repository path now causes clone to fail, previously did not fail

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-plugin
    • None
    • Linux master server with job tied to execute on master node

      The git plugin "Advanced" configuration section accepts a "reference" repository path.

      Previously, if there was a value in that path and if that path existed, then the --reference argument was added to the "git clone" and the clone was able to dramatically reduce the time to clone and the disc space used by that cloned copy of the repository, especially for large repositories.

      With the plugin version 1.2.0, if a reference value is given, it must exist, otherwise the clone operation fails with a message in the stack trace that the reference repository does not exist.

      That is very inconvenient for my use case, since some of my slave agents have the reference repository in that location, and others do not. Previously, that meant some of the slaves needed more disc space than others to clone this large repository, but they were still able to clone the repository.

      With the new implementation, if the reference directory does not exist on all slaves, I must either remove the reference argument or must assure that all slaves have that reference directory available.

      Stack trace is:

      ERROR: Error cloning remote repo 'origin' : Could not clone git://mwaite6.ptcnet.ptc.com/git/mwaite/bin.git
      hudson.plugins.git.GitException: Could not clone git://mwaite6.ptcnet.ptc.com/git/mwaite/bin.git
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:218)
      at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1002)
      at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:941)
      at hudson.FilePath.act(FilePath.java:852)
      at hudson.FilePath.act(FilePath.java:834)
      at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:941)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1113)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1256)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:590)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:495)
      at hudson.model.Run.execute(Run.java:1502)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:237)
      Caused by: hudson.plugins.git.GitException: Reference path does not exist: /var/cache/git/repo-does-not-exist.git
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:206)
      ... 14 more
      Trying next repository
      ERROR: Could not clone repository
      FATAL: Could not clone
      hudson.plugins.git.GitException: Could not clone
      at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1014)
      at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:941)
      at hudson.FilePath.act(FilePath.java:852)
      at hudson.FilePath.act(FilePath.java:834)
      at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:941)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1113)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1256)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:590)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:495)
      at hudson.model.Run.execute(Run.java:1502)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:237)

            ndeloof Nicolas De Loof
            markewaite Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: