Error
The git fetch command specifies a remote that doesn't exist in the local repository.
Why this matters
Fetching from a non-existent remote fails silently in some contexts and produces confusing errors. Catching this early prevents wasted time debugging connectivity issues when the real problem is a typo or missing remote configuration.
How to fix
Check available remotes and use a valid one:
# List configured remotes:
git remote -v
# Fetch from an existing remote:
git fetch upstream
# Add a missing remote first:
git remote add upstream https://github.com/org/repo.git
git fetch upstream
Configuration
[validators.git.fetch]
enabled = true
severity = "error"
Hook output
When this error is triggered, klaudiush writes JSON to stdout:
permissionDecisionReason (shown to Claude):
[GIT024] Remote does not exist. Specify valid remote: git fetch <remote> (use 'git remote -v' to list remotes)
systemMessage (shown to user): Formatted error with fix hint and reference URL.
additionalContext (behavioral guidance):
Automated klaudiush validation check. Fix the reported errors and retry the same command.
Related
- GIT007 - missing remote for push