Navigation: Documentation Index · CLI Reference
Complete reference for all Versionings exit codes, their causes, and remediation steps. Use this document to diagnose errors in local development and CI pipelines.
| Code | Name | Category | Description |
|---|---|---|---|
| 0 | SUCCESS | Success | Successful completion |
| 1 | CONFIG_ERROR | User/Config | Configuration error |
| 2 | DIRTY_TREE | User/Config | Uncommitted changes in working tree |
| 3 | INVALID_ARGS | User/Config | Invalid CLI arguments |
| 4 | ARTIFACT_CONFLICT | User/Config | Branch or tag already exists |
| 5 | COMMAND_FAILED | Runtime | Git/npm command failed |
| 6 | NETWORK_ERROR | Runtime | Network error |
| 7 | INCOMPLETE_ROLLBACK | Runtime | Rollback could not complete all steps |
| 8 | NO_OPERATION | User/Config | Nothing to rollback |
| 9 | USER_CANCELLED | User/Config | User cancelled the operation |
| 10 | POLICY_VIOLATION | User/Config | Branch protection policy violated |
| 11 | NO_CONVENTIONAL_COMMITS | User/Config | No conventional commits found for auto-bump |
A zero exit code indicates the operation completed without errors. When --json is used, the output is a single JSON object on stdout:
{
"success": true,
"version": "1.2.3",
"branch": "version/patch/1.2.3/fix-login",
"tag": "1.2.3--fix-login"
}In non-JSON mode, a human-readable summary is printed to stdout. No action is required.
Configuration file is missing, unreadable, or fails schema validation.
Typical causes:
- No configuration file found (
version.json,.versioningsrc,.versioningsrc.json,.versioningsrc.yml,.versioningsrc.yaml, orversioningskey inpackage.json) - Configuration file contains invalid JSON or YAML syntax
- A required field is missing (e.g.,
git.platformorgit.url) - A field value does not match the expected type or enum (e.g.,
git.platform: "unsupported")
Example error message:
Error [CONFIG_ERROR]: Configuration validation failed
- git.platform: must be one of github, github-enterprise, bitbucket, bitbucket-server, gitlab, azure-devops
- git.url: is required
Remediation steps:
- Run
versionings validate --jsonto see all validation errors. - Run
versionings doctorto check environment and config health. - Fix the reported fields in your configuration file.
- If unsure about the schema, refer to
version.schema.jsonor runversionings initto generate a valid config.
Retryable: No — fix the configuration first.
The working tree has uncommitted changes. Versionings requires a clean working tree before performing mutations to ensure rollback safety.
Typical causes:
- Unstaged or staged changes detected by
git status --porcelain - Untracked files that are not in
.gitignore
Example error message:
Error [DIRTY_TREE]: Working tree has uncommitted changes
M src/index.ts
?? temp.log
Remediation steps:
- Commit your changes:
git add . && git commit -m "save work". - Or stash them:
git stash. - Or discard them:
git checkout -- .(use with caution). - Re-run the versionings command.
Retryable: Yes — after committing or stashing changes.
The CLI was invoked with invalid or missing arguments.
Typical causes:
- Unknown subcommand (e.g.,
versionings deploy) - Missing required flags (e.g.,
--semveror--branchforrelease) - Invalid value for
--semver(e.g.,--semver=huge)
Example error message:
Error [INVALID_ARGS]: Unknown argument: deploy
Available commands: init, validate, plan, release, rollback, doctor, changelog
Remediation steps:
- Check the command syntax:
versionings <command> --help. - Verify that
--semveruses a valid value:patch,prepatch,minor,preminor,premajor,prerelease,major, orauto. - Verify that all required flags are provided for the subcommand.
Retryable: No — fix the arguments first.
A branch or tag that Versionings needs to create already exists locally or on the remote.
Typical causes:
- A version branch with the same name already exists (e.g.,
version/patch/1.2.3/fix-login) - A tag with the same name already exists (e.g.,
1.2.3--fix-login) - A previous release attempt was partially completed and not rolled back
Example error message:
Error [ARTIFACT_CONFLICT]: Branch already exists: version/patch/1.2.3/fix-login
Local branch exists. Delete it or use a different branch name.
Remediation steps:
- Delete the conflicting branch:
git branch -D version/patch/1.2.3/fix-login. - Delete the conflicting tag:
git tag -d 1.2.3--fix-login. - If the artifact exists on the remote, delete it there too:
git push origin --delete version/patch/1.2.3/fix-login. - Or use a different
--branchcomment to generate a unique name. - If a previous release was interrupted, run
versionings rollbackfirst.
Retryable: No — delete the conflicting artifact or use a different name.
A git or npm command executed by Versionings returned a non-zero exit code.
Typical causes:
npm versionfailed due to lifecycle script errorsgit pushwas rejected by the remote (e.g., force-push protection)git tagfailed due to GPG signing issues- File system permissions prevent writing
Example error message:
Error [COMMAND_FAILED]: Command failed: git push origin version/patch/1.2.3/fix-login
remote: error: GH006: Protected branch update failed.
remote: error: Required status check is expected.
Remediation steps:
- Check the full error output (use
--verbosefor detailed command logs). - If
git pushwas rejected, verify remote permissions and branch protection rules. - If
npm versionfailed, checkpackage.jsonlifecycle scripts (preversion,version,postversion). - Re-run the command after resolving the underlying issue.
Retryable: Depends on the cause — transient issues (e.g., temporary remote unavailability) are retryable; permission or configuration issues are not.
A network operation failed. This typically occurs during remote git operations or SCM API calls.
Typical causes:
- Git remote is unreachable (DNS failure, firewall, VPN disconnected)
- SCM API request timed out (configurable via
git.api.timeout) - Authentication token is expired, revoked, or has insufficient permissions
Example error message:
Error [NETWORK_ERROR]: Failed to create pull request via GitHub API
Request timed out after 30000ms
URL: https://api.github.com/repos/owner/repo/pulls
Remediation steps:
- Verify network connectivity:
git ls-remote origin. - Check that your authentication token is valid and has the required scopes.
- If the API timed out, increase
git.api.timeoutin your configuration. - If behind a proxy or firewall, ensure the SCM API endpoint is accessible.
- Re-run the command.
Retryable: Yes — network issues are typically transient.
A rollback operation could not complete all reversal steps. The repository may be in a partially rolled-back state requiring manual intervention.
Typical causes:
- A branch or tag was already deleted externally during rollback
- Network failure occurred mid-rollback while reverting remote changes
- File system error prevented reverting a local change
Example error message:
Error [INCOMPLETE_ROLLBACK]: Rollback partially failed
✓ Reverted: npm version (1.2.3 → 1.2.2)
✓ Reverted: branch version/patch/1.2.3/fix-login deleted locally
✗ Failed: could not delete remote branch version/patch/1.2.3/fix-login
Manual recovery required. See details above.
Remediation steps:
- Review the rollback output to identify which steps succeeded and which failed.
- Manually complete the failed steps (e.g.,
git push origin --delete <branch>). - Verify the repository state:
git status,git branch -a,git tag -l. - Run
versionings doctorto confirm the environment is healthy.
Retryable: No — manual intervention is required to resolve the partial state.
There is nothing to rollback. This occurs when versionings rollback is invoked but no previous operation log exists.
Typical causes:
- No previous
releaseoperation was performed in this repository - The operation log file was deleted or is not accessible
- A rollback was already completed for the last operation
Example error message:
Error [NO_OPERATION]: Nothing to rollback
No operation log found. Run a release first.
Remediation steps:
- Verify that a release was previously executed in this repository.
- Check that the operation log file exists and is readable.
- If you need to undo changes manually, use standard git commands.
Retryable: No — there is no operation to rollback.
The user declined a confirmation prompt during an interactive session.
Typical causes:
- User answered "no" to the release confirmation prompt
- User pressed Ctrl+C during an interactive prompt
- An interactive prompt timed out waiting for input
Example error message:
Error [USER_CANCELLED]: Operation cancelled by user
The release was not performed. No changes were made.
Remediation steps:
- Re-run the command and confirm the prompt.
- To skip confirmation prompts, use the
--yes(or-y) flag. - In CI environments, use
--cior--non-interactiveto disable prompts entirely.
Retryable: Yes — re-run the command with --yes to auto-confirm.
A branch protection policy defined in the configuration was violated.
Typical causes:
- The generated branch name does not match the required naming convention
- The target branch is protected and the current operation is not allowed
- The branching strategy constraints are not satisfied (e.g., hotfix from wrong source branch)
Example error message:
Error [POLICY_VIOLATION]: Branch protection policy violated
Branch "feature/1.2.3" does not match required pattern "version/{semver}/{version}/{comment}"
Strategy: git-flow
Remediation steps:
- Review the branch protection rules in your configuration (
git.branchingsection). - Ensure the branching strategy is correctly configured for your workflow.
- Use
versionings planto preview the branch name before executing a release. - Adjust the
branchTemplateorstrategyin your configuration if the policy is too restrictive.
Retryable: No — fix the configuration or branch naming.
The --semver=auto flag was used but no conventional commits were found in the commit history, and conventionalCommits.fallbackBump is set to null.
Typical causes:
- No commits follow the Conventional Commits format (
<type>[(<scope>)][!]: <description>) - The commit range being analyzed contains only non-conventional commit messages
conventionalCommits.fallbackBumpis explicitly set tonull(no fallback)
Example error message:
Error [NO_CONVENTIONAL_COMMITS]: No conventional commits found for auto-bump
Analyzed 12 commits between v1.2.2 and HEAD.
None matched the conventional commit format.
Set conventionalCommits.fallbackBump to "patch", "minor", or "major" to provide a default.
Remediation steps:
- Use conventional commit messages in your repository (e.g.,
feat: add login,fix: resolve crash). - Set
conventionalCommits.fallbackBumpto a default bump level ("patch","minor", or"major") in your configuration. - Or specify the bump level explicitly instead of using
--semver=auto(e.g.,--semver=patch).
Retryable: No — add conventional commits or configure a fallback bump level.
Handle exit codes in CI scripts to provide clear feedback and appropriate failure behavior:
#!/usr/bin/env bash
set -euo pipefail
result=$(versionings release --semver=patch --branch=fix --ci --json 2>&1) || exit_code=$?
exit_code=${exit_code:-0}
case $exit_code in
0) echo "Release successful" ;;
1|3) echo "Configuration or argument error — fix and re-run" ; exit 1 ;;
2) echo "Dirty working tree — commit or stash changes" ; exit 1 ;;
4) echo "Artifact conflict — branch or tag exists" ; exit 1 ;;
5|6) echo "Runtime error — check logs and retry" ; exit 1 ;;
7) echo "Incomplete rollback — manual intervention required" ; exit 1 ;;
*) echo "Unexpected exit code: $exit_code" ; exit 1 ;;
esacFor more CI integration examples, see the CLI Reference.