Skip to content
Hibouhibou

Forge Providers

Hibou supports connecting to multiple Git forges simultaneously. You can even connect multiple instances of the same forge type (e.g., two separate Forgejo servers).

Type Value Notes
GitHub github GitHub.com or GitHub Enterprise
Forgejo forgejo Forgejo instances (v7+)
Gitea gitea Gitea instances (uses same provider as Forgejo)
GitLab gitlab GitLab.com or self-hosted

Each forge is configured via environment variables using a zero-based index:

HIBOU_FORGE_{N}_TYPE
HIBOU_FORGE_{N}_ID
HIBOU_FORGE_{N}_URL
HIBOU_FORGE_{N}_CLIENT_ID
HIBOU_FORGE_{N}_CLIENT_SECRET
HIBOU_FORGE_{N}_WEBHOOK_SECRET

Where {N} is 0, 1, 2, etc. Hibou reads indexes sequentially and stops at the first gap.

You can configure multiple instances of the same forge type. For example, connecting both a staging and production Forgejo:

Terminal window
# Staging Forgejo
HIBOU_FORGE_0_TYPE=forgejo
HIBOU_FORGE_0_ID=forgejo-staging
HIBOU_FORGE_0_URL=https://git.staging.example.com
HIBOU_FORGE_0_CLIENT_ID=...
HIBOU_FORGE_0_CLIENT_SECRET=...
HIBOU_FORGE_0_WEBHOOK_SECRET=...
# Production Forgejo
HIBOU_FORGE_1_TYPE=forgejo
HIBOU_FORGE_1_ID=forgejo-prod
HIBOU_FORGE_1_URL=https://git.example.com
HIBOU_FORGE_1_CLIENT_ID=...
HIBOU_FORGE_1_CLIENT_SECRET=...
HIBOU_FORGE_1_WEBHOOK_SECRET=...

In your Forgejo instance:

  1. Go to Site Administration → Applications
  2. Click Create a new OAuth2 Application
  3. Set:
    • Application Name: Hibou
    • Redirect URI: http://YOUR_HIBOU_URL/auth/callback
  4. Save and copy the Client ID and Client Secret

Choose a random string for webhook signature verification:

Terminal window
openssl rand -hex 32
Terminal window
HIBOU_FORGE_0_TYPE=forgejo
HIBOU_FORGE_0_ID=my-forgejo
HIBOU_FORGE_0_URL=https://git.example.com
HIBOU_FORGE_0_CLIENT_ID=<client-id>
HIBOU_FORGE_0_CLIENT_SECRET=<client-secret>
HIBOU_FORGE_0_WEBHOOK_SECRET=<webhook-secret>

Forgejo and Gitea share the same API. Use type forgejo for Forgejo instances and gitea for Gitea instances — both use the same underlying provider implementation.

Each forge provider validates incoming webhook payloads using HMAC signatures:

Forge Header Algorithm
GitHub X-Hub-Signature-256 HMAC-SHA256
Forgejo/Gitea X-Gitea-Signature HMAC-SHA256
GitLab X-Gitlab-Token Token comparison

Requests with invalid or missing signatures are rejected with HTTP 401.