This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      JENKINS-24728 broke our use of shallow clone. Basically, we are getting the following error:

      ```
      > git config remote.origin.url git@REDACTED # timeout=10
      Pruning obsolete local branches
      Fetching upstream changes from git@REDACTED
      > git --version # timeout=10
      using GIT_SSH to set credentials
      > git -c core.askpass=true fetch --tags --progress git@REDACTED +refs/heads/:refs/remotes/origin/ --prune --depth=1
      Checking out Revision 1f2bf20dfc5a408d56181c9db99ac994545f44c3 (origin/master)
      > git config core.sparsecheckout # timeout=10
      > git checkout -f 1f2bf20dfc5a408d56181c9db99ac994545f44c3 # timeout=10
      FATAL: Could not checkout master with start point 1f2bf20dfc5a408d56181c9db99ac994545f44c3
      hudson.plugins.git.GitException: Could not checkout master with start point 1f2bf20dfc5a408d56181c9db99ac994545f44c3
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1990)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
      at hudson.remoting.UserRequest.perform(UserRequest.java:121)
      at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      at hudson.remoting.Request$2.run(Request.java:324)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at hudson.remoting.Engine$1$1.run(Engine.java:63)
      at java.lang.Thread.run(Thread.java:745)
      at ......remote call to i-b8caab51-5500c494(Native Method)
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
      at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
      at hudson.remoting.Channel.call(Channel.java:781)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
      at sun.reflect.GeneratedMethodAccessor705.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
      at com.sun.proxy.$Proxy72.execute(Unknown Source)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1135)
      at hudson.scm.SCM.checkout(SCM.java:485)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
      at hudson.model.Run.execute(Run.java:1738)
      at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      Caused by: hudson.plugins.git.GitException: Command "git checkout -f 1f2bf20dfc5a408d56181c9db99ac994545f44c3" returned status code 128:
      stdout:
      stderr: fatal: reference is not a tree: 1f2bf20dfc5a408d56181c9db99ac994545f44c3

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1695)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1691)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1321)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1333)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1966)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
      at hudson.remoting.UserRequest.perform(UserRequest.java:121)
      at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      at hudson.remoting.Request$2.run(Request.java:324)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at hudson.remoting.Engine$1$1.run(Engine.java:63)
      at java.lang.Thread.run(Thread.java:745)
      ```

      From comparing build logs, I believe that the issue is this line:

      ```
      git -c core.askpass=true fetch --tags --progress git@REDACTED +refs/heads/:refs/remotes/origin/ --prune --depth=1
      ```

      From a build with a prior version of the plugin, I see the following output:

      ```
      git -c core.askpass=true fetch --tags --progress git@git.freelancer.com:eng/production.git +refs/heads/:refs/remotes/origin/ --prune
      ```

            Assignee:
            Unassigned
            Reporter:
            Joshua Spence
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: