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

git won't checkout branch names with transition from "x" to "x/y"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • git-plugin
    • None

      Someone created a branch in my project called "a/c_param". When my Jenkins pipeline scm checkout fires, the job fails instantly with a message that suggests that perhaps the git plugin does not correctly handle branch names with slashes.

      Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress git@github.com:myghaccount/doorstep-django.git +refs/heads/*:refs/remotes/origin/*" returned status code 1:
      stdout: 
      stderr: remote: Counting objects: 13, done.        
      remote: Total 13 (delta 11), reused 11 (delta 11), pack-reused 1        
      error: cannot lock ref 'refs/remotes/origin/a/c_param': 'refs/remotes/origin/a' exists; cannot create 'refs/remotes/origin/a/c_param'
      From github.com:myghaccount/doorstep-django
       ! [new branch]            a/c_param  -> origin/a/c_param  (unable to update local ref)
         d89ad4d743..d3a07094cd  master     -> origin/master
      Auto packing the repository in background for optimum performance.
      See "git help gc" for manual housekeeping.
      error: The last gc run reported the following. Please correct the root cause
      and remove .git/gc.log.
      Automatic cleanup will not be performed until the file is removed.

            Unassigned Unassigned
            piratejohnny Jon B
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: