KognitaKognita.
← Onboarding

Connect GitLab

Kognita connects to GitLab via OAuth. After authorization, Kognita can list and access the repositories and groups your GitLab account has access to.

The connection is at the organization level in Kognita. Once your GitLab account is connected, all projects in the Kognita organization can add repos from that GitLab account.

Part 1 — Connect your GitLab account

1

Open Git connections

In the dashboard sidebar, click Git connections.

2

Click Connect next to GitLab

Click Connect in the GitLab row. Kognita will generate an OAuth authorization URL and redirect you to GitLab.

3

Authorize Kognita on GitLab

GitLab will show an authorization page listing the permissions Kognita is requesting — these are scoped to reading your repositories and profile. Review them, then click Authorize.

4

Connection confirmed

GitLab redirects you back to Kognita. The GitLab row in Git connections will show connected alongside your GitLab username and avatar.

Part 2 — Add GitLab repos to a project

1

Open a project

Click any project from the sidebar or create a new one with + New project.

2

Click + Add repo

From the project detail page, click + Add repo in the top-right corner.

3

Select GitLab as the provider

In the modal, click the GitLab provider button. Kognita will load the list of repositories accessible through your connected GitLab account, including repos across your personal namespace and any GitLab groups you belong to.

4

Select a repository

Use the search box to filter by repo name (e.g. backend-api). Repositories from all your accessible GitLab namespaces appear in the list. Private repos are labeled private. Click the repo you want.

5

Confirm the branch and add

The branch field auto-fills with the default branch. Change it if needed, then click Add. The repo appears in your project with not indexed status.

6

Index the repositories

Click Index all, confirm, and wait for indexing to complete (typically a few minutes). Kognita indexes every repository in the project together. Status updates to indexed when done.

Troubleshooting

I can't see repos from a GitLab group

Make sure the GitLab account you authorized has at least Reporter access to the group or project. Group ownership is not required, but you need read access to the repos.

I authorized with the wrong GitLab account

Go to Git connections, click Disconnect next to GitLab, then Connect again. You'll be sent back to GitLab where you can log in with the correct account before authorizing.

GitLab returned an error on redirect

This can happen if the OAuth flow times out or the state token expires. Try clicking Connect again from Git connections to start a fresh authorization.

How do I revoke access?

In GitLab, go to your user Settings → Applications → Authorized applications and revoke Kognita. Also disconnect from Kognita's Git connections panel so the connection record is removed.