Troubleshooting
Kod includes kod doctor for quick local diagnostics:
kod doctorThe command checks:
- Git availability
- Client configuration from
~/.kod/config.json - Data directory access
- Repository directory access
- SSH server configuration
- HTTP server health
- API token authentication
If any check fails, kod doctor exits with a non-zero status.
Common Fixes
Section titled “Common Fixes”Git Is Missing
Section titled “Git Is Missing”Install Git and confirm it is on your PATH:
git --versionClient Config Is Missing
Section titled “Client Config Is Missing”Run kod init and enter the server URL and token:
kod initYou can also override the client configuration for one command:
kod --server https://git.example.com --token kod_your_token repo listServer Is Unreachable
Section titled “Server Is Unreachable”Check that the Kod server is running:
curl http://localhost:3000/healthFor production, verify your reverse proxy forwards to the HTTP port configured with KOD_PORT or --port.
Token Is Rejected
Section titled “Token Is Rejected”Create a new token or check that the existing token has the permissions required for the command:
kod token create alice --username alice --permissions repo:read,repo:writeFor collaborator Git access, the token must have a username and that username must be added to the repository.
Data or Repository Directory Is Not Writable
Section titled “Data or Repository Directory Is Not Writable”Check ownership and permissions for the configured directories:
ls -ld ~/.kod/data ~/.kod/reposFor systemd deployments, make sure the User= in the service can read and write the configured paths.
SSH Clone Fails
Section titled “SSH Clone Fails”Confirm the server has SSH enabled and that the client uses the right port:
kod serve --ssh --ssh-port 2222git clone ssh://kod@git.example.com:2222/my-app.gitThen verify the collaborator setup:
kod repo my-app collaborator listkod keys listThe SSH key must belong to a username that owns the repository or is listed as a collaborator. Anonymous SSH uses the anonymous username and is read-only.
Webhook Delivery Fails
Section titled “Webhook Delivery Fails”Inspect delivery history:
kod repo my-app webhook deliveries <webhook-id>Look at the response status, error, attempt count, and next retry timestamp. After fixing the receiver, retry a failed delivery:
kod repo my-app webhook retry <webhook-id> <delivery-id>