| title | Other Git Integration | ||
|---|---|---|---|
| description | Ingest private repositories from a self-managed Git host such as Gerrit, Gitea, or self-hosted Bitbucket over HTTPS or SSH | ||
| product | Context7 | ||
| section | docs | ||
| source_url | https://context7.com/docs/enterprise/integrations/other-git | ||
| fetched | 2026-09-26 | ||
| tags |
|
Ingest private repositories from a self-managed Git host such as Gerrit, Gitea, or self-hosted Bitbucket over HTTPS or SSH
Context7 can clone and index repositories from any self-managed Git host that isn't GitHub or GitLab, such as Gerrit, Gitea, or self-hosted Bitbucket, over HTTPS or SSH.
Under Settings → Integrations → Other Git, enter the repository host, choose HTTPS or SSH, and then add repositories with their normal clone URL. The host is shared by both authentication methods and also selects which repositories use the review publishing settings.
If you use Gerrit, see the Gerrit integration guide to submit generated code documentation through refs/for/{branch}.
Enter the host, select HTTPS, and fill in the account credentials:
| Field | Description |
|---|---|
| Host | The Git host, without https://. For example, gerrit.your-company.com. Repositories whose https:// URL is on this host are cloned with the credentials below. |
| Username | The account username. This is required, because HTTP basic auth needs a username (for Gerrit, generate an HTTP password in its settings and use that account's username). |
| HTTP Password / Token | The account's HTTP password or access token. |
Then add a repository with its HTTPS clone URL, for example https://gerrit.your-company.com/a/platform/sdk.
When a repository is added with an ssh:// URL, for example ssh://<user>@gerrit.your-company.com:29418/platform/sdk, Context7 authenticates with a deploy key. Enter the repository host, select SSH, and register the key's public half on a service account in your Git host that can read the repositories you want to index. Then give Context7 the private half one of two ways.
On the SSH tab, paste the private key. It is stored encrypted and used for all ssh:// clones. Optionally paste a known_hosts entry to pin the host key; if you leave it blank, the host key is trusted on first use.
Generate the known_hosts entry with ssh-keyscan, for example:
ssh-keyscan -p 29418 gerrit.your-company.comThat's all you need. Add repositories with their ssh:// URL and they clone with the pasted key.
If you prefer the private key never touch the application (it is never written to the database or included in backups), mount it into the container instead and point Git at it with GIT_SSH_COMMAND. Leave the UI SSH key blank, and a mounted key is used whenever no key is configured in the UI.
```yaml
spec:
containers:
- name: context7
env:
- name: GIT_SSH_COMMAND
value: "ssh -i /etc/git-ssh/id_ed25519 -o UserKnownHostsFile=/etc/git-ssh/known_hosts"
volumeMounts:
- name: git-ssh
mountPath: /etc/git-ssh
readOnly: true
volumes:
- name: git-ssh
secret:
secretName: context7-git-ssh
defaultMode: 0400
```
Once the host is configured, add repositories the same as any other source:
From **Add Repository**, choose the **Other Git** source. Enter the repository's clone URL. The scheme selects how it authenticates:- **HTTPS**: `https://gerrit.your-company.com/a/platform/sdk` (uses the HTTPS credentials above).
- **SSH**: `ssh://<user>@gerrit.your-company.com:29418/platform/sdk` (uses the deploy key).
You can also declare these repositories in a GitOps manifest to manage the whole index as code.