Saltar al contenido principal

Connecting Gitea to Your Application

Gitea is a personal-access-token connector. It performs no OAuth redirect, so there is no callback URL to register and no client id or secret to configure — on Plexicus SaaS or on a self-hosted deployment. You supply your instance URL and a token, and Plexicus validates the token against your instance before saving it.

The token needs, at minimum:

  • repository: read — repository discovery, cloning and scanning
  • user: read — Plexicus verifies the token against your instance's /api/v1/user endpoint
  • organization: read (read:organization, shown in Gitea as Organization → Read) — listing organizations so you can pick an owner. A token that can sign in but cannot list organizations is not enough
  • repository: write — additionally required for remediation pull requests

Follow these steps to connect your Gitea account:

1. Open Settings › Integrations​

  • Log in to your account
  • In the left sidebar, click Settings, then Integrations
  • Select the SCM category
  • Click Configure on the Gitea card
Settings › Integrations, SCM category

2. Initiate the Connection​

  • The panel opens on the Gitea Configuration tab
  • In Gitea URL, enter the address of your Gitea instance, or https://gitea.com if you use gitea.com
Gitea Panel
  • In Token, paste a Gitea personal access token. To create one, sign in to Gitea, open Settings › Applications, enter a token name, select the permissions listed above and generate the token
Gitea manage token

3. Finalize the Connection​

  • Click Connect
  • The Gitea card in Settings › Integrations shows Enabled

If Connect reports that the token can sign in but cannot list organizations, edit the token under Settings › Applications, enable Organization → Read (read:organization), and save the connector again.

4. Setup app.ini file​

  • To make sure if the Gitea url can be accessible to our platform, you can apply below changes:
[cors]
ENABLED = true
ALLOW_DOMAIN = plexicus.ai
ALLOW_SUBDOMAIN = true
  • If some cases you want to have some extra configuration like firewall or IP Whitelist, this is our latest IP: 68.221.250.222
nota

Please take a note the IP will likely to change in any moment due to our application updates.

Self-hosted Plexicus

The domain and IP above apply to Plexicus SaaS. On a self-hosted deployment substitute your own: set ALLOW_DOMAIN to your Plexicus hostname, and allow-list the egress IP of your Plexicus cluster rather than the one above. Gitea only has to be reachable from your own network.

Next Steps​

You can now scan repositories from Gitea: open Repo Scan in the left sidebar and click Add Repository. See Add repositories to scan.

Repo Scan page