Connect GitLab and the Coder works on your projects the same way it does on GitHub: it reads the project, its merge requests, its issues, and its pipelines, copies the project into its own workspace, and hands you a merge request for review. When your house rules allow it, it can also merge.
All three kinds take the same scopes. They differ in who they act as and what they can reach.
Token
Acts as
Reaches
Where you can use it
Project access token
Its own project member
One project
Every self-managed tier; on gitlab.com, Premium and Ultimate
Group access token
Its own group member
Every project in one group
Every self-managed tier; on gitlab.com, Premium and Ultimate
Personal access token
You
Every project you can reach
Every tier
A project token keeps access narrowest, and its merge requests show the token's own name rather than yours. On the gitlab.com Free tier, use a personal token, ideally on an account that only belongs to the projects the Coder should touch.
The Coder needs a project path, written as group/project or group/subgroup/project.
In your message. Name it, or paste its link: "Coder, in acme/platform/web, fix the login redirect."
For good, per Coder. Open Settings, Coders, edit the Coder, and under Repository and login choose GitLab as source control and fill in Repository with the project path. See several Coders.
Each Coder can also act as its own GitLab member: choose Its own login and paste that member's token, with the same scopes and role as above.
Pushing and merging follow your house rules. The Coder pushes to a new branch of its own, never to your default branch, and never force pushes. Pushing waits for your Approve. Merging follows your merge policy: review only by default, and never while the pipeline is failing or still running. Your protected branch rules on GitLab still apply.
Drafts. A merge request the Coder opens starts with Draft: in its title. GitLab does not merge a draft, so choose Mark as ready before you ask the Coder to merge.
Merge method. GitLab merges with your project's own merge method (merge commit, merge commit with semi-linear history, or fast-forward). Change it under the project's Settings, Merge requests.
If the clone fails, the job stops as Blocked before any coding and says what to fix, usually that the token cannot read that project or has expired.
Several code hosts connected? A link, the word GitLab, or "merge request" in your message picks GitLab.
Self-managed GitLab is not connected from the app yet. The Coder's workspace must also be allowed to reach your server. Ask support if you need it.
Revoke at any time. Revoke the token in GitLab and the Coder loses access straight away. Then choose Turn off on the GitLab card.