I am using GitLab 7.7.2 and tried to remove Tag in a repository in GitLab. I could remove tag in a local repository but cannot remove tag in origin. How do I remove tag in GitLab repository?
$ git tag -d Tag_AAA Deleted tag 'Tag_AAA' (was d10bff2) $ git push --delete origin Tag_AAA remote: GitLab: You don't have permission To [email protected]:root/Repository.git ! [remote rejected] Tag_AAA (pre-receive hook declined) error: failed to push some refs to '[email protected]:root/Repository.git'
Protected tags can only be deleted by using GitLab either from the UI or API. These protections prevent you from accidentally deleting a tag through local Git commands or third-party Git clients.
Use Git to delete a Git tag To delete the Git tag from the local repo, run the git tag -d tag-name command where tag-name is the name of the Git tag you want to delete.
In order to delete a remote Git tag, use the “git push” command with the “–delete” option and specify the tag name. To delete a remote Git tag, you can also use the “git push” command and specify the tag name using the refs syntax.
--prune-tags Before fetching, remove any local tags that no longer exist on the remote if --prune is enabled. This option should be used more carefully, unlike --prune it will remove any local references (local tags) that have been created.
Obviously you don't have the permission of deleting tags in remote GitLab repo.
Either ask for the owner of the repo to grant you the permission of master or let him help you to delete the tag would help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With