Back to all errors

GIT025

GIT

Push to blocked remote

Error

The git push command targets a remote that is on the blocked list.

Why this matters

Organizations may block certain remotes to enforce workflow conventions. For example, blocking origin in a fork-based workflow ensures developers push to the organization's repository via upstream instead of their personal fork.

How to fix

Use an allowed remote instead:

# Check available remotes:
git remote -v

# Push to an allowed remote:
git push upstream main

Configuration

[validators.git.push]
blocked_remotes = ["origin"]
allowed_remote_priority = ["upstream", "origin"]

The allowed_remote_priority list determines which remote to suggest when a blocked remote is used. The first available non-blocked remote from this list is suggested.

Hook output

When this error is triggered, klaudiush writes JSON to stdout:

permissionDecisionReason (shown to Claude): [GIT025] Push to blocked remote. Use an allowed remote for push

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.

  • GIT022 - Kong org push to origin blocked
  • GIT007 - missing remote for push

© 2026 Smykla Skalski Labs