Gitexit code > 0
remote: error: hook declined
$remote: error: hook declined to update refs/heads/main
Analysis
A pre-receive hook on the server side rejected your push.
Common Triggers
- ●Failing tests or linting checks on the server.
- ●Protected branch policies (e.g., no direct pushes to main).
Debug Checks
- $Read the output above the error for specific hook messages.
- $Check repository contribution guidelines.
Resolution
1
Fix the issues reported by the hook (linting, tests).
2
Follow the pull request process if direct pushes are blocked.
Metadata
- Tool
- Git
- Severity
- High
- Tags
- #git#hooks#push