Forgejo & Git Hosting
Tawa provides private Git hosting via Forgejo at git.insureco.io. Push to deploy — no CI config needed.
Getting Started with Forgejo
The tawa login command authenticates both Bio-ID and Forgejo in a single flow. After Bio-ID OAuth completes, the CLI automatically chains a Forgejo OAuth2+PKCE flow so you’re authenticated with the Git server as well.
# Authenticate with Bio-ID and Forgejo
tawa loginOnce logged in, create a repository on git.insureco.io with an auto-deploy webhook:
# Create a repo with auto-deploy webhook
tawa git create my-serviceThen add the Forgejo remote to your local repository and push:
git remote add origin [email protected]:username/my-service.git
git push -u origin mainThat first push triggers the builder automatically — your service will be built, deployed, and live within minutes.
Auto-Deploy Webhooks
When you create a repo with tawa git create, the CLI registers a webhook on Forgejo that notifies the builder on every push. Here’s how it works:
- You push to the default branch (
mainormaster) - Forgejo sends a webhook payload to the builder with the commit SHA
- The builder clones at that exact commit and runs the full deploy pipeline
- Your service is built, pushed to the registry, deployed via Helm, and DNS is configured
main or master). Pushes to feature branches do not trigger a deploy.The auto-deploy pipeline is identical to what runs when you use tawa deploy manually — Docker build, Helm deploy, database provisioning, OAuth provisioning, Koko registration, and DNS configuration all happen automatically.
Authentication
There are several ways to authenticate with the Forgejo Git server:
| Method | How | Best for |
|---|---|---|
tawa login | OAuth2 flow — stores credentials in ~/.tawa/forgejo-credentials.json | Day-to-day development |
tawa git login <token> | Personal Access Token (PAT) — stored in ~/.tawa/forgejo-credentials.json | CI/headless environments |
| SSH keys | Add your public key in your git.insureco.io user settings | Git push/pull without token prompts |
| Web SSO | Sign in to git.insureco.io via Bio-ID in your browser | Browsing repos, managing settings |
CI/Headless Environments
In environments where a browser-based OAuth flow isn’t possible (CI pipelines, Docker containers, remote servers), use a Personal Access Token:
- Go to
git.insureco.io→ Settings → Applications → Generate New Token - Give the token a descriptive name and select the scopes you need
- Store the token with the CLI:
tawa git login <token>For GitHub Actions or other CI systems, set the FORGEJO_TOKEN environment variable instead:
# In your CI config (e.g., .github/workflows/deploy.yml)
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}The CLI will detect the environment variable automatically and use it for Forgejo API calls.
Forgejo vs GitHub
You can host your code on either Forgejo or GitHub. Here’s how they compare on the Tawa platform:
| Feature | Forgejo (git.insureco.io) | GitHub / GitLab |
|---|---|---|
| Hosting | Private, platform-managed | External |
| Auto-deploy on push | Yes — webhook fires on default branch push | No — use tawa deploy manually |
| SSO | Bio-ID (same identity as the rest of Tawa) | Separate authentication |
| Setup command | tawa git create <name> | tawa link |
| Deploy pipeline | Full pipeline (build, Helm, DNS, OAuth, databases) | Same pipeline, triggered via tawa deploy |
tawa link to connect the repo and deploy with tawa deploy.Common Commands
| Command | Description |
|---|---|
tawa git create my-site | Create a repo on git.insureco.io with an auto-deploy webhook |
tawa git login <token> | Authenticate with a Personal Access Token (for CI/headless use) |
tawa link | Link an existing GitHub or GitLab repo to the builder |
tawa login | Full OAuth flow — authenticates both Bio-ID and Forgejo |
tawa login --skip-git | Authenticate Bio-ID only, skip Forgejo OAuth chain |
tawa deploy | Manual deploy (use when hosting on GitHub instead of Forgejo) |
Related
- Getting Started — deploy your first service
- OAuth Integration — how Bio-ID authentication works
- catalog-info.yaml Reference — full service configuration options