Repository navigation
Description
Description
I ran the initial release with Python Semantic Release 10.7.0. With Git tag pruning enabled (fetch.pruneTags=true), the release commit was created and pushed, but the newly created local release tag was removed during the upstream verification fetch. Semantic Release then failed to push the tag.
Expected behavior
The upstream verification fetch should not remove the release tag created by the current invocation. Both the release commit and tag should be pushed successfully.
Actual behavior
The upstream branch verification succeeded, but the tag push failed because the local tag ref no longer existed:
error: src refspec refs/tags/v1.0.0 does not match any
GitPushError: Failed to push tag (v1.0.0) to remote
The release commit had already been pushed.
Environment
Operating System (w/ version): Windows (version not recorded)
Python version: 3.15.2
Pip version: Not installed in the uv-managed environment
Semantic-release version: 10.7.0
Build tool (w/ version): uv 0.13.6
Configuration
Semantic Release Configuration
[tool.semantic_release]
assets = ["uv.lock"]
allow_zero_version = false
version_toml = ["pyproject.toml:project.version"]
tag_format = "v{version}"
commit_parser = "conventional"
commit_parser_options = { minor_tags = ["feat"], patch_tags = ["fix", "perf", "docs"] }
build_command = "uv lock"
[tool.semantic_release.branches.main]
match = "main"
prerelease = false
[tool.semantic_release.remote]
type = "bitbucket"
ignore_token_for_push = true
Execution Log
uv run semantic-release -vvv version --no-vcs-release
Running build command uv lock
Build completed successfully!
Fetching latest changes from remote 'origin'
Verified upstream branch 'origin/main' has not changed
error: src refspec refs/tags/v1.0.0 does not match any
GitPushError: Failed to push tag (v1.0.0) to remote
Additional context
Git had fetch.prune=true and fetch.pruneTags=true. Semantic Release creates the tag before checking whether the upstream branch changed; the verification fetch prunes the new tag because it is not on the remote yet.
This repository-specific override prevented the failure:
git config --local remote.origin.pruneTags false
With that override, the initial release completed successfully.
Activity
codejedi365 commentedon Nov 13, 2026
Thank you for narrowing the cause down to this external configuration. It would have been very difficult for me to do. I'll see if there is a way to prevent that external git configuration from having an effect during the upstream verification fetch.
jmartens commentedon Nov 13, 2026
Not sure if it is doable otherwise it might be a corner case to document in known problems section.
jmartens commentedon Nov 14, 2026
I was thinking along the same line and was planning to test it Monday when I return to work, but you beat me to it @TiantianYZJ.
Thanks!