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

Failed to do git checkout for Multibranch pipeline

    • 4.1.3

      After update from 4.0.0 to 4.1.0, the multibranch pipeline is failing in git checkout when the pull request is created. 

      > git checkout -f fd060e799c8651217e0c54bcdd323aeb6b29d185 # timeout=10
      ERROR: Checkout failed
      hudson.plugins.git.GitException: Command "git checkout -f fd060e799c8651217e0c54bcdd323aeb6b29d185" returned status code 128:
      stdout: 
      stderr: fatal: reference is not a tree: fd060e799c8651217e0c54bcdd323aeb6b29d185
      
      	at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2848)
      	at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:3178)
      Caused: hudson.plugins.git.GitException: Could not checkout fd060e799c8651217e0c54bcdd323aeb6b29d185
      	at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:3206)
      	at PluginClassLoader for git//hudson.plugins.git.GitSCM._checkout(GitSCM.java:1360)
      	at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1277)
      Caused: java.io.IOException
      	at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1279)
      	at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:136)
      	at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:167)
      	at PluginClassLoader for workflow-multibranch//org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:148)
      	at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
      	at hudson.model.ResourceController.execute(ResourceController.java:101)
      	at hudson.model.Executor.run(Executor.java:446)
      ERROR: Maximum checkout retry attempts reached, aborting 

      The pipeline works correctly after downgrade to 4.0.0 version

          [JENKINS-74736] Failed to do git checkout for Multibranch pipeline

          We've identified and fixed an issue when tag discovery is used in conjunction with other discovery behaviors. The issue as reported is most likely related to a slash being present in the branch name. That bug was fixed in 4.1.1.

          Daniel Kjellin added a comment - We've identified and fixed an issue when tag discovery is used in conjunction with other discovery behaviors. The issue as reported is most likely related to a slash being present in the branch name. That bug was fixed in 4.1.1.

            dkjellin Daniel Kjellin
            krishnajadav Krishna
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: