Error
Git commit is missing the -S or --gpg-sign flag.
Why this matters
GPG signing proves you authored the commit. Without it, anyone can claim to be you in the git history.
How to fix
Add the -S flag to your git commit command:
# Instead of:
git commit -m "message"
# Use:
git commit -sS -m "message"
Prerequisites
Generate a GPG key if you don't have one:
gpg --full-generate-keyConfigure Git to use your key:
gpg --list-secret-keys --keyid-format=long git config --global user.signingkey YOUR_KEY_IDAdd your GPG key to GitHub/GitLab.
Configuration
Disable this check in config.toml:
[validators.git.commit]
required_flags = ["-s"] # Only require signoff, not GPG signing
Hook output
When this error is triggered, klaudiush writes JSON to stdout:
permissionDecisionReason (shown to Claude):
[GIT002] Git commit is missing the -S (GPG sign) flag. Add -S flag: git commit -sS -m "message"
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.