`gh release create v1.2.0` fails with `tag v1.2.0 exists locally but has not been pushed to org/repo, please push it before continuing or specify the --target flag to create a new tag`.
BeginnerTroubleshootingGitHub, Actions and Pull Request Issues
Answer
Likely causes → You tagged locally but did not push the tag, so GitHub cannot attach a release to it.
Diagnose →
git ls-remote --tags origin v1.2.0
git show --no-patch v1.2.0
Fix →
git push origin v1.2.0
gh release create v1.2.0 --generate-notes
Prevent → Release from CI on tag push (on: push: tags: ['v*']), or use git push --follow-tags for annotated tags.
More on GitHub, Actions and Pull Request Issues
A workflow step that pushes a version bump fails with `remote: Permission to org/repo.git denied to github-actions[bot].` and `The requested URL returned error: 403`.IntermediateA workflow pushes a commit or tag, but the workflow that should run on that push or tag never starts.IntermediateA container job fails on any Git command with `fatal: detected dubious ownership in repository at '/__w/app/app'`.IntermediateYour PR suddenly shows 340 changed files and dozens of commits you did not write.IntermediateThe PR is stuck on `Expected — Waiting for status to be reported` for a required check called `build`.IntermediateThe PR was approved, but merging shows "Review required" again after you pushed a small fix.Beginner