Tag conflict when force-pushing, despite having no tags or rulesets #183879
Select Topic AreaQuestion BodyI have a repo I'm getting ready for release, and I want to have a completely clean "initial import" state, so I've been doing the occasional force-push to clean it up (I don't care about breaking things at this point). I have been testing release creation using tags, but I've got into a problematic state where it won't let me create a tag even though I have no tags and no rulesets: I had previously created a How can I clean up this conflict? |
Replies: 2 comments 7 replies
|
github might be caching the old tag rules even though you deleted everything. few things to try:
the error message says "creations being restricted" which makes me think theres a ruleset somewhere even if you cant see it. did you check both the repo level AND org level rules? |
|
This looks like a repository ruleset restriction rather than a problem with the tag itself. The important part of the error is: "Cannot create ref due to creations being restricted." GitHub rulesets can restrict the creation of branches or tags, even if there are currently no visible tags in the repository. I would check: Repository → Settings → Rules → Rulesets and look for any active ruleset targeting tags, especially one with "Restrict creations" enabled. Also check whether an organization-level ruleset or inherited rule is applying to the repository. If a tag ruleset is found, either:
After changing the rule, try creating the tag again. If there is genuinely no applicable ruleset, I would check the repository's ruleset/organization settings and permissions rather than deleting and recreating the tag, because the error is coming from GitHub's repository-rule enforcement. |
yeah you can delete it directly on the remote with git push --delete origin v0.0.1
but honestly if new tags work fine and only v0.0.1 is stuck this sounds like a github backend issue where that specific tag reference got corrupted somehow. since youre doing a clean initial import anyway just skip v0.0.1 and start with v0.0.2 or something else.
if that is not feasible. I'd contact gh support