hudson.plugins.git.GitException: java.net.URISyntaxException: Cannot parse Git URI-ish: The uri was empty or null

Jenkins JIRA | Mark Waite | 3 years ago
  1. 0

    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}

    Jenkins JIRA | 3 years ago | Mark Waite
    hudson.plugins.git.GitException: java.net.URISyntaxException: Cannot parse Git URI-ish: The uri was empty or null
  2. 0

    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}

    Jenkins JIRA | 3 years ago | Mark Waite
    hudson.plugins.git.GitException: java.net.URISyntaxException: Cannot parse Git URI-ish: The uri was empty or null
  3. 0

    [JIRA] (JENKINS-40283) Job cannot be invoked from TFS Release Management

    Google Groups | 3 days ago | dast...@microsoft.com (JIRA)
    java.net.URISyntaxException: Cannot parse Git URI-ish: The uri was empty or null<br>
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JENKINS-19037] Empty error dialog appears when git job definition applied with no values in fields (Git plugin 2.0 beta) - Jenkins JIRA

    jenkins-ci.org | 1 year ago
    javax.servlet.ServletException: java.lang.RuntimeException: Failed to instantiate class hudson.plugins.git.GitSCM from {"value":"2","userRemoteConfigs": {"url":"","name":"","refspec":""} ,"branches": {"name":""} ,"gitTool":"jgit","":"auto"}
  6. 0

    Steps to reproduce: 1. Install git plugin 2. Create new job, choose any name, type free-style 3. Choose a git source code repository, enter an invalid url, click add 4. Click save at the bottom, an unhandled exception occurs and a 500 is returned with the stacktrace I've noticed that other fields nicely detect errors as soon as they lose focus and show a handy message. Would it be possible to do that here? Here are the log messages that get printed to the hudson log. The stack trace is the same as the one that is shown to the user: [webapp 2010/03/09 18:36:30] - Error while serving http://localhost:8080/job/argablarg/configSubmit java.lang.reflect.InvocationTargetException 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 org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:169) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:101) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:54) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:74) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:519) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:180) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:519) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:435) at org.kohsuke.stapler.Stapler.service(Stapler.java:123) at javax.servlet.http.HttpServlet.service(HttpServlet.java:45) at winstone.ServletConfiguration.execute(ServletConfiguration.java:249) at winstone.RequestDispatcher.forward(RequestDispatcher.java:335) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86) at winstone.FilterConfiguration.execute(FilterConfiguration.java:195) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47) at winstone.FilterConfiguration.execute(FilterConfiguration.java:195) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164) at winstone.FilterConfiguration.execute(FilterConfiguration.java:195) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368) at winstone.RequestDispatcher.forward(RequestDispatcher.java:333) at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244) at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150) at java.lang.Thread.run(Thread.java:637) Caused by: hudson.plugins.git.GitException: Error creating repositories at hudson.plugins.git.GitSCM$DescriptorImpl.newInstance(GitSCM.java:800) at hudson.plugins.git.GitSCM$DescriptorImpl.newInstance(GitSCM.java:730) at hudson.model.Descriptor.newInstance(Descriptor.java:396) at hudson.scm.SCMS.parseSCM(SCMS.java:66) at hudson.model.AbstractProject.submit(AbstractProject.java:1489) at hudson.maven.MavenModuleSet.submit(MavenModuleSet.java:702) at hudson.model.Job.doConfigSubmit(Job.java:1005) at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:547) ... 35 more Caused by: java.net.URISyntaxException: Cannot parse Git URI-ish: invalid at org.spearce.jgit.transport.URIish.initializeFromString(URIish.java:115) at org.spearce.jgit.transport.URIish.<init>(URIish.java:82) at org.spearce.jgit.transport.RemoteConfig.<init>(RemoteConfig.java:149) at org.spearce.jgit.transport.RemoteConfig.getAllRemoteConfigs(RemoteConfig.java:106) at hudson.plugins.git.GitSCM$DescriptorImpl.newInstance(GitSCM.java:796) ... 42 more [Winstone 2010/03/09 18:36:30] - Untrapped Error in Servlet javax.servlet.ServletException: hudson.plugins.git.GitException: Error creating repositories at org.kohsuke.stapler.Stapler.invoke(Stapler.java:554) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:180) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:519) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:435) at org.kohsuke.stapler.Stapler.service(Stapler.java:123) at javax.servlet.http.HttpServlet.service(HttpServlet.java:45) at winstone.ServletConfiguration.execute(ServletConfiguration.java:249) at winstone.RequestDispatcher.forward(RequestDispatcher.java:335) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86) at winstone.FilterConfiguration.execute(FilterConfiguration.java:195) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47) at winstone.FilterConfiguration.execute(FilterConfiguration.java:195) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164) at winstone.FilterConfiguration.execute(FilterConfiguration.java:195) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368) at winstone.RequestDispatcher.forward(RequestDispatcher.java:333) at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244) at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150) at java.lang.Thread.run(Thread.java:637) Caused by: hudson.plugins.git.GitException: Error creating repositories at hudson.plugins.git.GitSCM$DescriptorImpl.newInstance(GitSCM.java:800) at hudson.plugins.git.GitSCM$DescriptorImpl.newInstance(GitSCM.java:730) at hudson.model.Descriptor.newInstance(Descriptor.java:396) at hudson.scm.SCMS.parseSCM(SCMS.java:66) at hudson.model.AbstractProject.submit(AbstractProject.java:1489) at hudson.maven.MavenModuleSet.submit(MavenModuleSet.java:702) at hudson.model.Job.doConfigSubmit(Job.java:1005) at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:547) 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 org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:169) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:101) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:54) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:74) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:519) ... 25 more Caused by: java.net.URISyntaxException: Cannot parse Git URI-ish: invalid at org.spearce.jgit.transport.URIish.initializeFromString(URIish.java:115) at org.spearce.jgit.transport.URIish.<init>(URIish.java:82) at org.spearce.jgit.transport.RemoteConfig.<init>(RemoteConfig.java:149) at org.spearce.jgit.transport.RemoteConfig.getAllRemoteConfigs(RemoteConfig.java:106) at hudson.plugins.git.GitSCM$DescriptorImpl.newInstance(GitSCM.java:796) ... 42 more

    Jenkins JIRA | 7 years ago | jeremyhuiskamp
    javax.servlet.ServletException: hudson.plugins.git.GitException: Error creating repositories

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.net.URISyntaxException

      Cannot parse Git URI-ish: The uri was empty or null

      at org.eclipse.jgit.transport.URIish.<init>()
    2. JGit - Core
      URIish.<init>
      1. org.eclipse.jgit.transport.URIish.<init>(URIish.java:205)
      1 frame
    3. org.jenkinsci.plugins
      JGitAPIImpl.prune
      1. org.jenkinsci.plugins.gitclient.JGitAPIImpl.listRemoteBranches(JGitAPIImpl.java:879)
      2. org.jenkinsci.plugins.gitclient.JGitAPIImpl.prune(JGitAPIImpl.java:857)
      2 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    5. Hudson :: Remoting Layer
      InterceptingExecutorService$1.call
      1. hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299)
      2. hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:280)
      3. hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:239)
      4. hudson.remoting.UserRequest.perform(UserRequest.java:118)
      5. hudson.remoting.UserRequest.perform(UserRequest.java:48)
      6. hudson.remoting.Request$2.run(Request.java:326)
      7. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      7 frames
    6. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.FutureTask.run(Unknown Source)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      3 frames
    7. Hudson :: Remoting Layer
      Engine$1$1.run
      1. hudson.remoting.Engine$1$1.run(Engine.java:63)
      1 frame
    8. Java RT
      Thread.run
      1. java.lang.Thread.run(Unknown Source)
      1 frame