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 readsRead one file at the default branch (API only).
Starter workflowCommit a ready-to-run Rebase workflow file to the default branch (API only; fails if the file already exists).
Promotion merge requestsOpen an MR that adds or updates one file (API only; rebase hillclimb promote --pr currently targets GitHub).

Setup

Create a GitLab access token with api scope, then run the command below. A read_api token is enough to connect and read files, but starter workflows and promotion merge requests need api.

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 and repo fields, exactly like GitHub. Deploys still upload source through the SDK. Commit-pinned deploys (rebase deploy --source github) and GitOps-protected environments currently require a GitHub connection: a GitLab connection records the repo but does not yet enforce clean commits.

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