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

Error when Building Project - FATAL: Illegal char <:> at index 5:

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • git-plugin
    • Jenkins 2.332.3
      Git Plugin 4.11.2
      Windows Server 2019
      Microsoft Open JDK 11.0.15
    • git plugin 4.11.3

      When attempting to clone a github repository through a FreeStyle project, we are encountering the following error -
      FATAL: Illegal char <:> at index 5: https://github.com/FOO-ORG/FOO-PROJECT.git
      java.nio.file.InvalidPathException: Illegal char <:> at index 5: https://github.com/FOO-ORG/FOO-PROJECT.git
       at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
      at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
      at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
      at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
      at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)
      at java.base/java.nio.file.Path.of(Path.java:147)
      at java.base/java.nio.file.Paths.get(Paths.java:69)
      at hudson.plugins.git.GitSCM.abortIfSourceIsLocal(GitSCM.java:1399)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1282)
      at hudson.scm.SCM.checkout(SCM.java:540)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1215)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:645)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:517)
      at hudson.model.Run.execute(Run.java:1896)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
      at hudson.model.ResourceController.execute(ResourceController.java:101)
      at hudson.model.Executor.run(Executor.java:442)
      Finished: FAILURE
      Rolling back to version 4.11.1 fixes the issue and we are able to clone without issue. Obviously I'd prefer we are on the latest version at all times, but we are unable to test or deploy to production with the latest version of the plugin in use.

          [JENKINS-68562] Error when Building Project - FATAL: Illegal char <:> at index 5:

          Mark Waite added a comment - - edited

          Thanks for reporting the issue. I can duplicate the failure on a Jenkins controller running on Windows. Likely, a new release of the git plugin will be needed in order to fix the problem.

          The problem does not seem to be visible when performing the clone from an agent on Windows or from a controller on a non-Windows operating system, only from a Jenkins controller that is running on Windows.

          A workaround is available that can be enabled with the system property:

          hudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT=true

          Mark Waite added a comment - - edited Thanks for reporting the issue. I can duplicate the failure on a Jenkins controller running on Windows. Likely, a new release of the git plugin will be needed in order to fix the problem. The problem does not seem to be visible when performing the clone from an agent on Windows or from a controller on a non-Windows operating system, only from a Jenkins controller that is running on Windows. A workaround is available that can be enabled with the system property: hudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT=true

          Kyle Wheat added a comment -

          Thanks!

          Kyle Wheat added a comment - Thanks!

          Kyle Wheat added a comment - - edited

          I can confirm that the workaround functions with the latest version of the plugin for all of our projects.

          Kyle Wheat added a comment - - edited I can confirm that the workaround functions with the latest version of the plugin for all of our projects.

          Devin Nusbaum added a comment -

          The same issue also applies to the Mercurial and Repo plugins, which received comparable security fixes.

          Devin Nusbaum added a comment - The same issue also applies to the Mercurial and Repo plugins, which received comparable security fixes.

          Mark Waite added a comment - - edited

          Also released as git plugin 4.9.;2

          Mark Waite added a comment - - edited Also released as git plugin 4.9.;2

            dnusbaum Devin Nusbaum
            kwheat2064 Kyle Wheat
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: