当名称与分支名称不明确时,如何删除git中的远程标记

当名称与分支名称不明确时,如何删除git中的远程标记,git,Git,当名称与分支名称不明确时,如何删除git中的远程标记 $ git push origin :refs/tags/<tag name> Enter passphrase for key '/c/Users/xxxxxxx/.ssh/id_rsa': remote: Branch refs/tags/<tag name>: remote: You need 'Push' rights with the 'Force Push' remote: flag set to dele

当名称与分支名称不明确时,如何删除git中的远程标记

$ git push origin :refs/tags/<tag name>
Enter passphrase for key '/c/Users/xxxxxxx/.ssh/id_rsa':
remote: Branch refs/tags/<tag name>:
remote: You need 'Push' rights with the 'Force Push'
remote: flag set to delete references.
remote: User: xxxxxxx
remote: Please read the documentation and contact an administrator
remote: if you feel the configuration is incorrect
remote: Processing changes: refs: 1, done
To ssh://xxxxxxx@xxxxxxx:xxxxxxx/xxxxxxx.git
 ! [remote rejected] <tag name> (cannot delete references)
error: failed to push some refs to 'ssh://xxxxxxx@xxxxxxx:xxxxxxx/xxxxxxx.git'
$git推送原点:参考/标记/
输入密钥“/c/Users/xxxxxxx/.ssh/id\u rsa”的密码短语:
远程:分支引用/标记/:
远程:您需要“强制推送”权限
远程:设置为删除引用的标志。
远程:用户:xxxxxxx
远程:请阅读文档并与管理员联系
远程:如果您觉得配置不正确
远程:处理更改:参考:1,完成
到ssh://xxxxxxx@xxxxxxx:xxxxxxx/xxxxxxx.git
! [远程拒绝](无法删除引用)
错误:无法将某些引用推送到'ssh://xxxxxxx@xxxxxxx:xxxxxxx/xxxxxxx.git'

请在这方面帮助我。这里我要删除的标记名与我要保留的分支之一相同。

远程存储库阻止您删除引用。它在错误消息中这样说:“您需要设置“强制推送”标志以删除引用的“推送”权限。”


Git的标记也是引用,就像,这就是为什么在远程推送或删除它们时它们没有区别。

你做的一切都是正确的。
refs/tags/
前缀应该消除名称的歧义。这里真正的问题是在poke的回答中描述的问题。我创建了
origin/origin/release/v1.0.0-rc1。
是偶然的,使用建议的force标志确实有帮助:
git push-f origin——删除origin/release/v1.0.0-rc1
,否则我还不断遇到
致命:模棱两可的参数“原始版本/发行版/v1.0.0-rc1..HEAD”:未知修订或路径不在工作树中