Service: Gitea - EyevinnOSC/community GitHub Wiki
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.
- 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.
Gitea needs a PostgreSQL database for repositories metadata, users, issues and configuration. Create it first and confirm it is running.
- Create a PostgreSQL instance (serviceId
birme-osc-postgresql, see PostgreSQL) withcreate-service-instance, giving it a name and aPostgresPassword. Wait withwait-for-service-ready. - Read the IP address and port with
describe-service-instance. The connection URL ispostgres://postgres:<password>@<IP>:<PORT>/postgres. - Store the full URL as a service secret with
create-service-secret(serviceId: "go-gitea-gitea", for example namedburl). - Create the Gitea instance with
create-service-instanceusingserviceId: "go-gitea-gitea". The instance name must be alphanumeric and at most 20 characters.
{ "name": "mygitea", "DatabaseUrl": "{{secrets.dburl}}" }- Wait for the instance with
wait-for-service-readyorget-instance-statusand read its URL withdescribe-service-instance.
OSC CLI example:
osc create go-gitea-gitea mygitea \
-o DatabaseUrl="postgres://postgres:[email protected]:10505/postgres"| 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.
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>.gitgit remote add origin https://<your-gitea-url>/<username>/<repo>.git
git push -u origin mainGitea 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.
- Storage is limited to 10 GiB per instance.