Getting Started
Gitea is a lightweight, self-hosted Git service that gives your team a full GitHub-like experience, including repositories, issues, pull requests, and CI/CD, without depending on a third-party platform. Available as an open web service in Eyevinn Open Source Cloud, Gitea is ideal for teams that want full control over their source code hosting.
Prerequisites
- If you have not already done so, sign up for an Eyevinn OSC account
Step 1: Create a PostgreSQL database
Gitea requires a database to store repositories, users, issues, and configuration. Create a PostgreSQL instance first by navigating to the PostgreSQL service in the OSC web console. Click Create psql-db, enter a name and a password, then click Create.
Once the instance is running, note the IP address and port shown on the instance card. The connection URL will be:
postgres://postgres:<password>@<IP>:<PORT>/postgres
Step 2: Store the connection URL as a secret
Store the database connection URL as a service secret so it is not exposed in plain text. Navigate to the Gitea service page, go to the Service Secrets tab, and click New Secret. Enter a name such as dburl and paste the full PostgreSQL connection URL as the value.
Step 3: Create a Gitea instance
Go to the My giteas tab on the Gitea service page and click Create gitea. Fill in:
- Name: a unique name for your instance (alphanumeric only, e.g.
mygitea) - DatabaseUrl:
{{secrets.dburl}}(references the secret created in Step 2)
Click Create and wait for the status indicator to turn green.
Step 4: Complete the installation wizard
Click the instance URL to open Gitea in your browser. On the first visit, Gitea displays an installation wizard where you set the administrator username, password, and email. Fill in your preferred credentials and click Install Gitea.
You will be redirected to the login page. Sign in with the administrator credentials you just created.
Usage example
Clone a repository from your Gitea instance using the standard git CLI:
git clone https://<your-gitea-url>/<username>/<repo>.git
Configure your git identity and push:
git remote add origin https://<your-gitea-url>/<username>/<repo>.git
git push -u origin main
CLI usage
osc create go-gitea-gitea mygitea \
-o DatabaseUrl="postgres://postgres:password@172.0.0.1:10505/postgres"