All connectors

Development

GitLab

GitLab Connector

Index a GitLab project: its Markdown files: including on a self-hosted instance.

Prerequisites

  • A GitLab project you can read
  • A Personal Access Token with the `read_api` scope

Data ingested

When you connect GitLab, the following content becomes searchable. Every answer that uses it cites it.

ContentWhat is kept
Markdown filesEvery `.md` file of the default branch, path and content kept
Project filesOther text files when *include source code* is on

Setup

Configuration happens in the dashboard, under Integrations. No API call is needed for a normal setup.

1

Create a token

gitlab.com → Preferences → Access tokens, scope `read_api`.

2

Enter the project

Integrations → Add source → GitLab, then the project path in the form `group/project`.

3

Set the host for a self-hosted instance

Leave `https://gitlab.com` for the cloud. For your own instance, put its full URL: a wrong host answers with a redirect, not an error.

4

Connect

Indexing starts immediately and the source row shows progress.

Where the credential goes
The token goes in the **Token** field. It is stored server-side and never returned by the API.

Configuration options

FieldDescriptionRequired
Project`group/project` of the project to indexYes
TokenPersonal Access Token with `read_api`Yes
HostGitLab base URL. Defaults to `https://gitlab.com`No
Include source codeIndex the Markdown files of the default branchNo

Best practices

  • •On a self-hosted instance, use a token that can read the project even if it is private: a token scoped to another namespace returns an empty listing.
  • •One connector per project. Indexing a whole group pulls in projects you did not mean to expose to the assistant.

Troubleshooting

Project not found

The path is case-sensitive and must include the group: `group/project`, not `project`.

Nothing indexed

The project has no Markdown file on its default branch. Turn on *include source code* if the documentation is in another format.

Connection refused on a self-hosted instance

The host must be reachable from the internet, and its certificate valid. A private address cannot be indexed.

Next steps

Once the source is connected and indexed, ask a question from the chat and check that the answer cites this source. A source that never appears in a citation is usually a source with nothing indexed: see Troubleshooting above.