Tags are deleted immediately after being created leading to the "No branch, tag or commit" error
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Tags added using the Bitbucket Server user interface (Bitbucket Server 4.7 release notes) are not accessible.
The following appears in the user interface:
No branch, tag or commit '<tag name>' exists in repository '<repository name>'
The following appears in the atlassian-bitbucket.log
(note the sequence of "Tag created" and "Tag deleted"):
ERROR [AtlassianEvent::thread-2] <username> @27FP67Gx996x67443x1 j4qj99 <ip address> "POST /rest/git/latest/projects/<project_key>/repos/<repository_name>/tags HTTP/1.1" b.f.bitbucket.hook.PushEmailNotifier Bad response status 302, body: , payload: {"channel":"#bitbucket","text":"*Push by <Full name> - (<username>)* [0000000..<url>@<url>] Tag created","username":"<repository_name> "}
...
ERROR [sg:thread-13] b.f.bitbucket.hook.PushEmailNotifier Bad response status 302, body: , payload: {"channel":"#bitbucket","text":"*Push by SubGit - (SubGit)* [<url>..0000000@<url>] Tag deleted","username":"repository_name "}
The full stack trace will be as follows:
Cause
The SVN Mirror for Bitbucket Server add on is causing the tag to be removed immediately after it has been created.
A similar issue has been reported on the add on developer issue tracker:
Resolution
Until the reported bug is resolved, uninstall the add on.