Forgejo
Connect Forgejo repositories for deployments through an OAuth2 application, set up push webhooks, and use Forgejo with Code Review.
Forgejo is a Gitea-family Git host (Codeberg runs on it). Skitflow connects to it the same way it connects to Gitea: you create an OAuth2 application on your Forgejo instance, give Skitflow its Client ID and Secret, and then use the repositories from that account in Applications or Docker Compose services.
Connect a Forgejo instance
Go to Settings → Git (/dashboard/settings/git-providers), choose Forgejo and fill in the form:
- Name: any name, for example
my-personal-account. - Forgejo URL: the address of your instance. The form is pre-filled with
https://codeberg.org; replace it for a self-hosted Forgejo. - Redirect URI: pre-filled by Skitflow as
<your-skitflow-url>/api/providers/forgejo/callback. Copy it into Forgejo. - Client ID and Client Secret: the values Forgejo gives you for the OAuth2 application.
- Skip TLS certificate verification: off by default. Turn it on only for a self-hosted Forgejo that uses a self-signed certificate. The server identity is then not verified for OAuth, API calls or git clones.
Steps:
- In Forgejo open
Settings→Applications(for examplehttps://codeberg.org/user/settings/applications) and findCreate a new OAuth2 Application. - Set the Application Name, for example
Skitflow. - Set the Redirect URI to the value shown in Skitflow.
- Create the application and copy the
Client IDandClient Secret. - Paste them into the Skitflow form and click
Configure Forgejo App. - Skitflow saves the provider and redirects you to Forgejo to authorize access. Click
Authorize. - You return to the
Gitsection of Skitflow with the provider connected, and its repositories become available inApplicationsandDocker Composeservices.
Forgejo is stored as a Gitea-type provider, so it behaves like Gitea after it is connected. For self-hosted instances, the administrator can restrict which provider URLs Skitflow may reach (GIT_PROVIDER_OUTBOUND_POLICY) and require HTTPS (GIT_PROVIDER_REQUIRE_HTTPS). Both default to permissive values on self-hosted installations.
Setup automatic deployments
The steps are the same for Applications and Docker Compose.
- Go to the service and open the
Deploymentstab. - Copy the
Webhook URL. - In Forgejo open the repository, then
Settings→Webhooks. - Click
Add Webhookand choose the Gitea webhook type. - Set the
Target URLto the URL you copied. - In the trigger section, select
Push events. - Save the webhook.
Skitflow recognizes a push from the X-Gitea-Event header that the Gitea webhook type sends. Use the Gitea type, not a generic one, so that header is present.
By default Skitflow deploys the branch the service has selected. A push to another branch does not trigger a deployment. To run several environments from one repository, create one service per branch.
Code Review with Forgejo
Forgejo can also be connected to Code Review. That connection is separate from the OAuth provider above and uses an access token instead:
- Create a dedicated bot account on Forgejo and an access token for it with repository and organization read/write scopes. Reviews are published from that account.
- In Code Review choose
Connect Forgejo, enter the Forgejo base URL (pre-filled withhttps://codeberg.org), the access token, and optionally an organization. With an organization, one organization webhook covers all its repositories. Without it, Skitflow syncs the token's repository memberships and creates a webhook per repository when you enable review. - Skitflow creates the webhook automatically. It accepts both the
X-Gitea-*andX-Forgejo-*header sets, because older Forgejo builds send only the Forgejo set.
A plain http:// base URL shows a warning, because the token would be sent unencrypted on every request. A self-hosted installation must enable code_review.enabled and code_review.gitea. See Code Review self-hosted setup.
Differences from Gitea
The two providers share the same connection flow and webhook handling. The differences are small:
- The add form defaults to
https://codeberg.orgfor Forgejo andhttps://gitea.comfor Gitea. - The OAuth callback is
/api/providers/forgejo/callbackfor Forgejo and/api/providers/gitea/callbackfor Gitea. - Code Review labels and defaults follow the chosen product, and Forgejo's own
X-Forgejo-*webhook headers are accepted there.