Hi repo-discuss,
resurfacing this topic, which is still happening on an updated Gerrit server v3.11.1.
To recap: Gerrit is rejecting direct pushes of annotated tags that have a certain name (name derived from 'git describe', fwiw) with the surprising message:
Cannot create ref 'refs/tags/V1.99.0026-g84775c3' because it already exists
To be clear, the tag does not exist on the server, as verified by:
1. running on the server "git show-ref | grep 84775c3" (shows only the refs/heads/Branchname, not refs/tags/)
2. running locally "git ls-remote origin | grep 84775c3" (as above, shows the branch, not the tag)
Update:
I tried tracing as Sven suggested, attaching to this message the relevant section of error_log as "gerrit-tag-trace.txt", but as far as I can tell, there is no additional information other than the error message above.
I did the trace with:
git push -o trace=push-tag-1 origin V1.99.0026-g84775c3
Other perhaps relevant points:
- I pushed as myself & am administrator, but other normal users reported the same problem
- The project config allows creating annotated tags, here is the relevant section:
[access "refs/tags/*"]
create = group Administrators
create = group Project Owners
create = group Registered Users
createSignedTag = group Administrators
createSignedTag = group Project Owners
createSignedTag = group Registered Users
createTag = group Administrators
createTag = group Project Owners
createTag = group Registered Users
push = +force group Administrators
push = +force group Project Owners
push = group Registered Users
- I am able to push tags with more "boring" names. For example this works:
git tag -a -m "Testing gerrit tag push" gerrit-test-tag-1
git push origin gerrit-test-tag-1