---
title: Gitea Integration
description: Learn how to connect your Gitea repositories to Capawesome Cloud to build and automate your app directly from source.
---

# Gitea Integration

Connect your Gitea repositories to Capawesome Cloud to build and automate your app directly from source. A Git connection stores your provider and credentials once at the organization level and can be reused by any app in that organization.

## Prerequisites

Before you begin, ensure you have:

- A [Capawesome Cloud](https://console.cloud.capawesome.io){:target="_blank"} account and an organization (owner or admin role to manage Git connections).
- A Gitea account with access to the repositories you want to connect.

## Create a Git connection

A Git connection is created once at the organization level and can be reused by every app in that organization.

1. Open your organization's [Git connections](https://console.cloud.capawesome.io/organizations/_/git){:target="_blank"} page and click **Create Git connection**.
2. Select **Gitea** as the provider.
3. Follow the steps below to authenticate with a personal access token.

### Personal access token (PAT)

Gitea connections authenticate with a personal access token.

1. Create a Gitea access token (**Settings → Applications**) with these scopes:
    - **User → Read** (`read:user`) and **Organization → Read** (`read:organization`) — required for every connection.
    - **Repository → Read** (`read:repository`) for a read-only connection, or **Repository → Read and Write** (`write:repository`) to enable [Automations](../automations/index.md) (also covers cloning).
2. Select **Personal access token (PAT)** as the authentication method and paste the token.
3. Because Gitea is typically self-hosted, enable **Self-hosted or enterprise instance** and enter your Gitea **Server URL**. Leave it empty only if you use a Gitea cloud instance such as `gitea.com`.

## Connect a repository to your app

Once a Git connection exists, connect a specific repository to your app:

1. Open your app's [Git repository](https://console.cloud.capawesome.io/apps/_/git){:target="_blank"} page and click **Connect Git repository**.
2. Select the Gitea connection.
3. Select the repository you want to connect.

You can also connect a repository during **Create app** (on the **Git** tab).
