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
| Capability | How |
|---|---|
| Source backing | Connect one repo per workspace, or one per project — the same workspace_repo / project_repo source modes as GitHub. |
| Repo file reads | Used to seed hillclimb re-searches from the incumbent model. |
| Starter workflow | Write a ready-to-run Rebase workflow into an empty repo. |
| Promotion merge requests | Open 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 gitlabOptions: --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-NEWGitLab-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 / Path | Purpose |
|---|---|
POST /integrations/gitlab/repo-connections | Validate token + repo, store token, connect. |
GET /integrations/gitlab/repo-connections | List the workspace's connections. |
GET /integrations/gitlab/repo-connections/{id}/file | Read one file at the default branch. |
POST /integrations/gitlab/repo-connections/{id}/starter-workflow | Commit a starter workflow. |
POST /integrations/gitlab/repo-connections/{id}/promotion-mr | Branch, commit one file, open an MR. |

