Service: Gitea - EyevinnOSC/community GitHub Wiki

Gitea

Gitea (serviceId go-gitea-gitea) is a lightweight, self-hosted Git service with repositories, issues, pull requests and CI/CD, without depending on a third-party platform. In Eyevinn Open Source Cloud (OSC) it is a long-running service instance with up to 10 GiB of storage per instance. License: MIT.

What it can do

  • Host Git repositories over HTTPS with the standard git CLI.
  • Manage issues and pull requests for a team.
  • Give a team full control over its source code hosting.

Creating an instance

Gitea needs a PostgreSQL database for repositories metadata, users, issues and configuration. Create it first and confirm it is running.

  1. Create a PostgreSQL instance (serviceId birme-osc-postgresql, see PostgreSQL) with create-service-instance, giving it a name and a PostgresPassword. Wait with wait-for-service-ready.
  2. Read the IP address and port with describe-service-instance. The connection URL is postgres://postgres:<password>@<IP>:<PORT>/postgres.
  3. Store the full URL as a service secret with create-service-secret (serviceId: "go-gitea-gitea", for example name dburl).
  4. Create the Gitea instance with create-service-instance using serviceId: "go-gitea-gitea". The instance name must be alphanumeric and at most 20 characters.
{ "name": "mygitea", "DatabaseUrl": "{{secrets.dburl}}" }
  1. Wait for the instance with wait-for-service-ready or get-instance-status and read its URL with describe-service-instance.

OSC CLI example:

osc create go-gitea-gitea mygitea \
  -o DatabaseUrl="postgres://postgres:[email protected]:10505/postgres"

Options

Option Required Type Meaning
name Yes string Name of the instance. Letters, digits and underscore only; on OSC at most 20 characters.
DatabaseUrl Yes string, sensitive Database connection URL. Gitea supports several database backends; on OSC use the PostgreSQL URL format postgres://<user>:<password>@<host>:<port>/<db>. Store as a service secret and pass as {{secrets.NAME}}.

A {{secrets.NAME}} reference must be the whole field value, so the entire URL must be the secret. Overwriting a secret does not restart a running instance.

Using the instance

Open the instance URL in a browser. On the first visit Gitea shows an installation wizard where you set the administrator username, password and email. After installing you are redirected to the login page; sign in with those credentials.

Clone and push with the standard git CLI:

git clone https://<your-gitea-url>/<username>/<repo>.git
git remote add origin https://<your-gitea-url>/<username>/<repo>.git
git push -u origin main

Backups

Gitea instances on paid OSC plans can be backed up and restored together with your database instances: automatic backups, manual backups, backup history and restore from a snapshot. See Database Backups.

Limitations

  • Storage is limited to 10 GiB per instance.

Resources

⚠️ **GitHub.com Fallback** ⚠️