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

Git plugin with checkout to subdir and prune stale branches fails all builds

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
    • Environment:
      Jenkins 1.509.4, Git 2.0, Git client 1.4.5, Windows and Linux, AMD64 and x86
    • Similar Issues:

      Description

      I configured a job with the git 2.0 plugin to checkout to a specific subdirectory and to prune stale branches. That pair of configuration settings cause the initial git operations to fail with both git command line and jgit implementations.

      The stack trace for the command line implementation is:

      Started by user anonymous
      Building remotely on alan-pc in workspace C:\J\workspace\git-multi-subdir-prune
      Pruning obsolete local branches
      FATAL: Command "config --get remote.origin.url" returned status code 1:
      stdout: 
      stderr: 
      hudson.plugins.git.GitException: Command "config --get remote.origin.url" returned status code 1:
      stdout: 
      stderr: 
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:940)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:921)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:865)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:875)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteUrl(CliGitAPIImpl.java:603)
      	at hudson.plugins.git.GitAPI.getRemoteUrl(GitAPI.java:61)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.prune(CliGitAPIImpl.java:393)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	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.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at hudson.remoting.Engine$1$1.run(Engine.java:63)
      	at java.lang.Thread.run(Unknown Source)
      

      The stack trace for the jgit implementation is:

      Started by an SCM change
      Started by user anonymous
      Building remotely on waite2011 in workspace D:\J\workspace\git-multi-jgit-subdir-prune
      Pruning obsolete local branches
      FATAL: java.net.URISyntaxException: Cannot parse Git URI-ish: The uri was empty or null
      hudson.plugins.git.GitException: java.net.URISyntaxException: Cannot parse Git URI-ish: The uri was empty or null
      	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.prune(JGitAPIImpl.java:869)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	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.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at hudson.remoting.Engine$1$1.run(Engine.java:63)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.net.URISyntaxException: Cannot parse Git URI-ish: The uri was empty or null
      	at org.eclipse.jgit.transport.URIish.<init>(URIish.java:205)
      	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.listRemoteBranches(JGitAPIImpl.java:879)
      	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.prune(JGitAPIImpl.java:857)
      	... 16 more
      

        Attachments

          Issue Links

            Activity

            markewaite Mark Waite created issue -
            ndeloof Nicolas De Loof made changes -
            Field Original Value New Value
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            ndeloof Nicolas De Loof made changes -
            Link This issue is duplicated by JENKINS-20257 [ JENKINS-20257 ]
            henriquer Henrique Rodrigues made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            Assignee Nicolas De Loof [ ndeloof ]
            markewaite Mark Waite made changes -
            Status Reopened [ 4 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            markewaite Mark Waite made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            markewaite Mark Waite made changes -
            Description I configured a job with the git 2.0 plugin to checkout to a specific subdirectory and to prune stale branches. That pair of configuration settings cause the initial git operations to fail with both git command line and jgit implementations.

            The stack trace for the command line implementation is:

            Started by user anonymous
            Building remotely on alan-pc in workspace C:\J\workspace\git-multi-subdir-prune
            Pruning obsolete local branches
            FATAL: Command "config --get remote.origin.url" returned status code 1:
            stdout:
            stderr:
            hudson.plugins.git.GitException: Command "config --get remote.origin.url" returned status code 1:
            stdout:
            stderr:
            at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:940)
            at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:921)
            at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:865)
            at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:875)
            at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteUrl(CliGitAPIImpl.java:603)
            at hudson.plugins.git.GitAPI.getRemoteUrl(GitAPI.java:61)
            at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.prune(CliGitAPIImpl.java:393)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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.run(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at hudson.remoting.Engine$1$1.run(Engine.java:63)
            at java.lang.Thread.run(Unknown Source)

            The stack trace for the jgit implementation is:

            Started by an SCM change
            Started by user anonymous
            Building remotely on waite2011 in workspace D:\J\workspace\git-multi-jgit-subdir-prune
            Pruning obsolete local branches
            FATAL: java.net.URISyntaxException: Cannot parse Git URI-ish: The uri was empty or null
            hudson.plugins.git.GitException: java.net.URISyntaxException: Cannot parse Git URI-ish: The uri was empty or null
            at org.jenkinsci.plugins.gitclient.JGitAPIImpl.prune(JGitAPIImpl.java:869)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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.run(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at hudson.remoting.Engine$1$1.run(Engine.java:63)
            at java.lang.Thread.run(Unknown Source)
            Caused by: java.net.URISyntaxException: Cannot parse Git URI-ish: The uri was empty or null
            at org.eclipse.jgit.transport.URIish.<init>(URIish.java:205)
            at org.jenkinsci.plugins.gitclient.JGitAPIImpl.listRemoteBranches(JGitAPIImpl.java:879)
            at org.jenkinsci.plugins.gitclient.JGitAPIImpl.prune(JGitAPIImpl.java:857)
            ... 16 more
            I configured a job with the git 2.0 plugin to checkout to a specific subdirectory and to prune stale branches. That pair of configuration settings cause the initial git operations to fail with both git command line and jgit implementations.

            The stack trace for the command line implementation is:

            {noformat}
            Started by user anonymous
            Building remotely on alan-pc in workspace C:\J\workspace\git-multi-subdir-prune
            Pruning obsolete local branches
            FATAL: Command "config --get remote.origin.url" returned status code 1:
            stdout:
            stderr:
            hudson.plugins.git.GitException: Command "config --get remote.origin.url" returned status code 1:
            stdout:
            stderr:
            at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:940)
            at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:921)
            at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:865)
            at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:875)
            at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteUrl(CliGitAPIImpl.java:603)
            at hudson.plugins.git.GitAPI.getRemoteUrl(GitAPI.java:61)
            at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.prune(CliGitAPIImpl.java:393)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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.run(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at hudson.remoting.Engine$1$1.run(Engine.java:63)
            at java.lang.Thread.run(Unknown Source)
            {noformat}

            The stack trace for the jgit implementation is:

            {noformat}
            Started by an SCM change
            Started by user anonymous
            Building remotely on waite2011 in workspace D:\J\workspace\git-multi-jgit-subdir-prune
            Pruning obsolete local branches
            FATAL: java.net.URISyntaxException: Cannot parse Git URI-ish: The uri was empty or null
            hudson.plugins.git.GitException: java.net.URISyntaxException: Cannot parse Git URI-ish: The uri was empty or null
            at org.jenkinsci.plugins.gitclient.JGitAPIImpl.prune(JGitAPIImpl.java:869)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            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.run(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at hudson.remoting.Engine$1$1.run(Engine.java:63)
            at java.lang.Thread.run(Unknown Source)
            Caused by: java.net.URISyntaxException: Cannot parse Git URI-ish: The uri was empty or null
            at org.eclipse.jgit.transport.URIish.<init>(URIish.java:205)
            at org.jenkinsci.plugins.gitclient.JGitAPIImpl.listRemoteBranches(JGitAPIImpl.java:879)
            at org.jenkinsci.plugins.gitclient.JGitAPIImpl.prune(JGitAPIImpl.java:857)
            ... 16 more
            {noformat}
            markewaite Mark Waite made changes -
            Status Reopened [ 4 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            markewaite Mark Waite made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            pmv pmv made changes -
            Link This issue is related to JENKINS-26197 [ JENKINS-26197 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 151782 ] JNJira + In-Review [ 207077 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                markewaite Mark Waite
              • Votes:
                3 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: