Error
The merge commit body has no Signed-off-by trailer.
Why this matters
The Signed-off-by trailer ties a commit to an identity, which matters for DCO compliance and author attribution on squash merges. Some organizations require it on every commit.
How to fix
Add signoff when merging
Pass the signoff in the --body flag:
gh pr merge <number> --squash --body "$(cat <<'EOF'
Summary of changes.
Detailed description of what was changed and why.
Signed-off-by: Your Name <your.email@klaudiu.sh>
EOF
)"
Check your git identity
Confirm your name and email are set:
git config user.name
git config user.email
Update if needed:
git config user.name "Your Name"
git config user.email "your.email@klaudiu.sh"
Configuration
Require signoff for merge commits:
[validators.git.merge]
require_signoff = true
Disable the signoff requirement:
[validators.git.merge]
require_signoff = false
Pin the expected signoff identity:
[validators.git.merge]
expected_signoff = "Your Name <your.email@klaudiu.sh>"
Examples
Squash merge with signoff
gh pr merge 123 --squash --body "$(cat <<'EOF'
feat(api): add user authentication
Implements JWT-based authentication with refresh tokens.
Includes middleware for route protection and token validation.
Closes #42
Signed-off-by: Developer Name <dev@klaudiu.sh>
EOF
)"
Auto-merge with signoff
gh pr merge 123 --auto --squash --body "$(cat <<'EOF'
fix(parser): handle edge cases
Handles empty input and malformed JSON gracefully.
Signed-off-by: Developer Name <dev@klaudiu.sh>
EOF
)"
Hook output
When this error is triggered, klaudiush writes JSON to stdout:
permissionDecisionReason (shown to Claude):
[GIT018] Merge commit body has no Signed-off-by trailer. Add --body flag with Signed-off-by trailer to gh pr merge command
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.