GitLab

Back workspace or project source with a GitLab repository using an access token.

The GitLab integration mirrors the GitHub integration with a simpler, token-based connection: no app installation — you connect a repository with a personal, group, or project access token. Both gitlab.com and self-managed GitLab instances are supported.

What It Provides

CapabilityHow
Source backingConnect one repo per workspace, or one per project — the same workspace_repo / project_repo source modes as GitHub.
Repo file readsUsed to seed hillclimb re-searches from the incumbent model.
Starter workflowWrite a ready-to-run Rebase workflow into an empty repo.
Promotion merge requestsOpen an MR that adds or updates one file — the promotion path for search winners.

Setup

Create a GitLab access token with api (or read_api + write_repository) scope, then:

rebase connect gitlab group/project --token glpat-...

Or let it resolve from the environment (GITLAB_ACCESS_TOKEN) or a hidden prompt, and infer the repo from your local git remote origin:

cd my-gitlab-repo/
rebase connect gitlab

Options: --host gitlab.mycompany.com for self-managed instances, --scope project --project NAME to back a single Rebase project instead of the workspace, --repo-path projects/x for monorepo layouts, --branch to override the default branch.

Token handling

The token is validated against the GitLab API at connect time, then stored as a workspace secret in the platform's Secret Manager — never in the Rebase database. The connection row carries only a secret reference. Reconnecting the same scope rotates the stored token, so token rotation is one command:

rebase connect gitlab group/project --token glpat-NEW

GitLab-Backed Deploys

Connecting a repo sets the workspace (or project) source_mode, exactly like GitHub. Deploys still upload source through the SDK — the repo connection provides provenance and governance (clean-commit enforcement, promotion MRs), not code delivery.

Reference

Method / PathPurpose
POST /integrations/gitlab/repo-connectionsValidate token + repo, store token, connect.
GET /integrations/gitlab/repo-connectionsList the workspace's connections.
GET /integrations/gitlab/repo-connections/{id}/fileRead one file at the default branch.
POST /integrations/gitlab/repo-connections/{id}/starter-workflowCommit a starter workflow.
POST /integrations/gitlab/repo-connections/{id}/promotion-mrBranch, commit one file, open an MR.

On this page