I made a spelling error on a tag message I pushed to the origin which I wanted to correct, but I am struggling to work out how to do it.
I edited the annotated tag message on my local branch successfully, using this page: How do I edit an existing tag message in git?
git tag <tag name> <tag name>^{} -f -m "<new message>"
this corrected the tag locally but I couldn't push the tag to the remote:
git push origin <tag name>
gave me an error
! [rejected] v1.7 -> v1.7 (already exists)
error: failed to push some refs to 'git@gitlab.com:tompkins/vectri.git'
hint: Updates were rejected because the tag already exists in the remote.
So I tried to simply delete the tag and start again. I deleted it locally and recreated it, but when I tried to use this page How to delete a remote tag? to delete it remotely:
git push --delete origin tagname
I received the error:
remote: GitLab: You cannot delete a tag
is it possible to edit remote tag messages?