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

InvalidTagNameException with version 1.0.4 of git client

    XMLWordPrintable

Details

    Description

      I just upgraded our git-client-plugin from 1.0.2 to 1.0.4 and now get an InvalidTagNameException. We were running Jenkins 1.505.

      The exception implies I've created a tag, which I certainly haven't, so I'm not sure how the issue is occurring. I'm assuming the issue is because the tag it believes it is receiving contains spaces.

      Here's the stacktrace:

      Using strategy: Default
      Last Built Revision: Revision b6db3c79b4f208e6989e4f10f00f564d189b7590 (origin/develop)
      Fetching changes from 1 remote Git repository
      Commencing build of Revision 8862b04b711a283d4e53962cc60e9b4203807d3a (origin/develop)
      Checking out Revision 8862b04b711a283d4e53962cc60e9b4203807d3a (origin/develop)
      FATAL: org.eclipse.jgit.api.errors.InvalidTagNameException: tag name jenkins-WOW - Dev-872 is invalid
      hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.InvalidTagNameException: tag name jenkins-WOW - Dev-872 is invalid
      at org.jenkinsci.plugins.gitclient.JGitAPIImpl.tag(JGitAPIImpl.java:179)
      at hudson.plugins.git.GitAPI.tag(GitAPI.java:220)
      at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1239)
      at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1196)
      at hudson.FilePath.act(FilePath.java:865)
      at hudson.FilePath.act(FilePath.java:838)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1196)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1353)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:683)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:588)
      at hudson.model.Run.execute(Run.java:1567)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:237)
      Caused by: org.eclipse.jgit.api.errors.InvalidTagNameException: tag name jenkins-WOW - Dev-872 is invalid
      at org.eclipse.jgit.api.TagCommand.processOptions(TagCommand.java:198)
      at org.eclipse.jgit.api.TagCommand.call(TagCommand.java:112)
      at org.jenkinsci.plugins.gitclient.JGitAPIImpl.tag(JGitAPIImpl.java:175)
      ... 14 more

      Attachments

        Activity

          markewaite Mark Waite added a comment -

          Since git-client-plugin 1.0.5 reverted to using the git CLI instead of using JGit as its default, I think this bug is fixed by git-client-plugin 1.0.5. Can you check that the issue is resolved by installing git-client-plugin 1.0.5?

          markewaite Mark Waite added a comment - Since git-client-plugin 1.0.5 reverted to using the git CLI instead of using JGit as its default, I think this bug is fixed by git-client-plugin 1.0.5. Can you check that the issue is resolved by installing git-client-plugin 1.0.5?

          I'm running "Jenkins GIT client plugin" 1.0.4, but it doesn't show any updates available.

          mddubs Matt Williamson added a comment - I'm running "Jenkins GIT client plugin" 1.0.4, but it doesn't show any updates available.
          markewaite Mark Waite added a comment -

          Go to the "Advanced" tab in the "Manage Plugins" section and you'll see an "Update Now" button in the bottom right corner. Above that "Update Now" button it will show the last time it polled for updates. If you press the "Update Now", it will poll immediately, and should then show the 1.0.5 plugin is available.

          markewaite Mark Waite added a comment - Go to the "Advanced" tab in the "Manage Plugins" section and you'll see an "Update Now" button in the bottom right corner. Above that "Update Now" button it will show the last time it polled for updates. If you press the "Update Now", it will poll immediately, and should then show the 1.0.5 plugin is available.

          Great, looks like that fixed all our issues! For others...

          Manage Jenkins -> Manage Plugins -> Advanced Tab -> Check now button (bottom right corner)

          Manage Jenkins -> Manage Plugins -> Updates Tab -> Install all (specifically Jenkins GIT Client Plugin 1.0.5)

          Thank you!!

          mddubs Matt Williamson added a comment - Great, looks like that fixed all our issues! For others... Manage Jenkins -> Manage Plugins -> Advanced Tab -> Check now button (bottom right corner) Manage Jenkins -> Manage Plugins -> Updates Tab -> Install all (specifically Jenkins GIT Client Plugin 1.0.5) Thank you!!
          markewaite Mark Waite added a comment -

          git-client-plugin 1.0.5 resolved this by switching back to the CLI as the default git implementation.

          markewaite Mark Waite added a comment - git-client-plugin 1.0.5 resolved this by switching back to the CLI as the default git implementation.

          People

            ndeloof Nicolas De Loof
            edhgoose Edward Hartwell Goose
            Votes:
            7 Vote for this issue
            Watchers:
            14 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: