Tags created by TagBot are not reachable

The tags created by the new TagBot (as GitHub actions) cannot be reached from the commits they point at. E.g. git describe does not show those tags (it does show those created by the older TagBot app, though).

I found this problem while trying to get the latest tag of RecurrenceAnalysis within Julia, with LibGit2:

LibGit2.GitTag(repo, "v1.2.0")
ERROR: GitError(Code:ERROR, Class:Object, Expected object of type LibGit2.GitTag, received object of type LibGit2.GitCommit)
Stacktrace:
 [1] LibGit2.GitTag(::GitRepo, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/LibGit2/src/repository.jl:147
 [2] top-level scope at none:0

(Same with v1.1.1, also released with the GitHub action, but not with older tags. I observed the same in other repos.)

@christopher-dG ^

1 Like

I think they are lightweight tags.

TagBot is probably now creating lightweight tags (which are just refs) as opposed to annotated tags (which are objects in their own right, and are represented in LibGit2 as GitTag objects).

See https://git-scm.com/book/en/v2/Git-Basics-Tagging for the details on the difference between the two.

@simonbyrne is correct, they are lightweight tags by default. Currently annotated tags are only created if necessary, i.e. if using an SSH key to authenticate, or if signing the tag with a GPG key.

Thoughts on adding an annotate option to allow forcing annotated tags? I’ve opened a PR here.

Thanks. What function of LibGit2.jl could I use to get the commit referred to by a given lightweight tag?