我正在使用GitLab 7.7.2并尝试在GitLab中的存储库中删除Tag。我可以删除本地存储库中的标记但不能删除原始标记。如何在GitLab存储库中删除标记?
$ 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'
显然你没有权限删除远程GitLab仓库中的标签。
请求回购的所有者授予您主人的许可,或者让他帮助您删除标记会有所帮助。
# delete locally:
git tag -d <tag>
# delete remotely:
git push origin :refs/tags/<tag>
# another way to delete remotely:
git push --delete origin <tag>
您需要具有维护者或所有者角色才能重写/删除Git标记。
请参阅GitLab权限:https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/permissions.md