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

git plugin throws error if you don't specify a specific branch name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-client-plugin
    • None
    • git 2.0-beta3 (/ master commit)

      If I don't specify a particular branch name, using JGit integration, I get
      an error.

      Workaround is to specify one.

      Building remotely on jenkins-1 in workspace /jenkins/workspace/Realtime-dev-main
      Fetching changes from the remote Git repository
      Checking out Revision 6dff8ca0de2e9605c295d09106b756485dbbe22d (origin/dev/main)
      FATAL: Could not checkout null
      hudson.plugins.git.GitException: Could not checkout null
      at org.jenkinsci.plugins.gitclient.JGitAPIImpl.checkout(JGitAPIImpl.java:200)
      at org.jenkinsci.plugins.gitclient.JGitAPIImpl.checkoutBranch(JGitAPIImpl.java:231)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:280)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:239)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: org.eclipse.jgit.api.errors.InvalidRefNameException: Branch name <null> is not allowed
      at org.eclipse.jgit.api.CheckoutCommand.processOptions(CheckoutCommand.java:471)
      at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:200)
      at org.jenkinsci.plugins.gitclient.JGitAPIImpl.checkout(JGitAPIImpl.java:185)
      ... 17 more

            ndeloof Nicolas De Loof
            magnayn magnayn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: