> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qodo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gerrit

> This guide explains how to connect Qodo Context Engine to a Gerrit server.

## Limitations

|                                  |               |                                                                                                                                                      |
| -------------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| Choose individual repos to index | Not supported | Qodo Context Engine indexes **all** repositories visible to the token. If you need to limit the scope, use a service account with restricted access. |
| Webhooks / Plugins               | N/A           | Integration is token‑only; no additional plugins are required.                                                                                       |

## 1. Generate an access token

Gerrit uses an HTTPS username and password for API and Git access.

### Prerequisites

You must have `Read` access to the relevant repositories, on top of the ability to just view them.

To make sure you have `Read` access:

<Steps>
  <Step>
    Go to **Repositories** ▸ **All-Projects** ▸ **Access** (**All-Projects** is an example, can be a specific project or a parent project that others inherit)
  </Step>

  <Step>
    Search for `Reference: refs/heads/*`
  </Step>

  <Step>
    Make sure the correct user's group has `Read`: `ALLOWED`.
  </Step>
</Steps>

### Generate HTTP access token

<Steps>
  <Step>
    Sign in to Gerrit and open **Settings ▸ HTTP Credentials**.
  </Step>

  <Step>
    Click **Generate New Password**.
  </Step>

  <Step>
    **Copy the generated password** – Gerrit shows it only once.
  </Step>

  <Step>
    **Note your Gerrit username**. It will be required alongside the password.
  </Step>
</Steps>

## 2. Send relevant information to Qodo

```bash theme={null}
[gerrit]
base_url = "<https://gerrit.example.com>"
username = "<GERRIT_USERNAME>"
token = "<HTTP_PASSWORD>"
```

### Key

| Field               | Description                                            |
| ------------------- | ------------------------------------------------------ |
| `<GERRIT_USERNAME>` | Gerrit account name used to generate the HTTP password |
| `<HTTP_PASSWORD>`   | The generated password/token from **HTTP Credentials** |
| `base_url`          | Base URL of your Gerrit server                         |

<Note>
  **Notes:**

  * Currently, only one Gerrit token is supported per deployment.
  * Ensure the account has read‑only access to the repositories you want indexed.
</Note>

## 3. (Optional) Set a custom certificate bundle

If your self-hosted Git server uses a custom CA SSL certificate, share your ca-certificate.pem file with the Qodo team.
