Git Deploy
Basil can serve your site as a Git repository over HTTPS. Clone it, edit, git push — and the running server picks up the changes with no restart. Push-to-deploy with nothing but Git.
Basil-only. The Git endpoint is part of the Basil server.
Quick Start
1. Enable it in basil.yaml:
git:
enabled: true
require_auth: true
2. Create a user and API key (see Running Basil):
basil users create # role: editor or admin
basil apikey create # → bsl_live_abc123… (save it!)
3. Clone your live site:
git clone https://anything:bsl_live_abc123...@yourserver.com/.git mysite
The username is ignored — only the API key matters.
4. Push changes:
cd mysite
# edit…
git add . && git commit -m "Update homepage"
git push
Basil reloads automatically on push.
Authentication & Roles
Git access uses API keys via HTTP Basic Auth (key as the password).
| Operation | Required role |
|---|---|
| Clone / pull | any authenticated user |
| Push | editor or admin |
Revoke a compromised key with basil apikey revoke <id> — no need to touch user accounts.
See Also
- Authentication — users, roles, and API keys
- Running Basil — the
usersandapikeyCLI - The Git guide — hooks, workflows, and troubleshooting