Error when tagging builds - "Tag on repository without HEAD currently not supported"

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      When I try to tag a specific build through Jenkins the first time after Jenkins is restarted, I get the following error:

      Tagging is in progress:
      
      ERROR: Error tagging repo 'origin/JENKINS-47646' : org.eclipse.jgit.api.errors.NoHeadException: Tag on repository without HEAD currently not supported
      hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.NoHeadException: Tag on repository without HEAD currently not supported
      	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.tag(JGitAPIImpl.java:519)
      	at hudson.plugins.git.GitTagAction$TagWorkerThread.perform(GitTagAction.java:199)
      	at hudson.model.TaskThread.run(TaskThread.java:129)
      Caused by: org.eclipse.jgit.api.errors.NoHeadException: Tag on repository without HEAD currently not supported
      	at org.eclipse.jgit.api.TagCommand.call(TagCommand.java:137)
      	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.tag(JGitAPIImpl.java:517)
      	... 2 more
      Trying next branch
      Completed
      

      After that initial failure, later attempts to tag that working copy will fail silently.

      When trying to tag in the workspace it works fine, HEAD is in fact attached, git refs look fine, could this be an issue that when Jenkins is trying to tag it is looking in the wrong working directory?

      Is there a way to pull more verbose logs with how it's trying to tag?

      FYI - using the Jenkins 2.85, and swarm Linux agents, latest Git plugin.

            Assignee:
            Unassigned
            Reporter:
            Vlad Soloviev
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: