GitLab¶
Crios reaches GitLab through a single access token per organization, saved by an organization owner or admin under Organization → Connectors → App credentials. With that token in place, any project in the organization can be backed by a GitLab repository instead of the built-in Git host. This is not a per-user connection: every member of the organization browses and picks repositories through the same shared token, so what that token can see is what everyone can pick. The screen itself is covered in Connectors & certificate authorities.
What the connector enables¶
- GitLab as a repository kind. GitLab appears in the Repository Kind list in the New Project dialog, and in the onboarding step that asks new users for a repository. It is offered only while the connector is configured.
- A repository picker. Instead of a free-text URL box, the Repository field becomes a searchable list of the GitLab projects the shared token can see. Picking one fills in the repository URL and the repository's actual default branch. Organization members, admins and owners can browse it; viewers and the agents running in sessions cannot.
- Repository indexing. Project memory fetches GitLab repositories with the same base URL and access token, so semantic code search works on a GitLab-backed project without a second credential.
- Sessions clone and push with it. A session on a GitLab-backed project clones the repository and pushes its branches with the organization's access token, so private repositories work. The token is only sent to the GitLab instance configured under Base URL; a project whose repository URL points at any other host gets no credentials.
Sessions can read the token
The token rides in the session's Git remote, so anything running in a session (the agent, or code it runs) can read it and use it on every project the token can reach. GitLab offers no narrower credential Crios could mint from it on every tier, so limit the token itself: use a group or project access token that covers only the repositories Crios should work in.
GitLab is an outbound connection: Crios calls GitLab, GitLab never calls Crios. There is no webhook URL on the GitLab card and nothing to register on the GitLab side, which also means GitLab issues, comments and merge requests do not drive work in Crios. Ticket intake is a GitHub, Jira and Slack feature; see External intake.
Configuring the connector¶
Configuring connectors requires the owner or admin role in the organization.
- In GitLab, open your avatar → Edit profile → Access tokens, or Settings → Access tokens on the group or project Crios should work in.
- Add a token with a name, an expiry date, and the
apiscope, which covers repository read/write and merge requests. - Copy the token. GitLab shows it only once.
- In Crios, go to Organization → Connectors → App credentials,
click Configure on GitLab, and paste the token into Access
token. Leave Base URL at
https://gitlab.comunless you run a self-managed instance. - Click Save & Apply, then Test Connection.
The connector has two fields:
| Field | Description |
|---|---|
| Base URL | The GitLab instance to talk to. Leave it empty or set it to https://gitlab.com for GitLab.com; point it at your own host for a self-managed instance. |
| Access token | The token Crios authenticates with. Stored encrypted and masked once saved. |
Saved values take effect immediately, with no restart. Each organization keeps its own values: saving here never changes another organization's GitLab connection.
Prefer a group or project token
A group or project access token limited to the repositories you want Crios to work in is safer than a personal one. The token's own permissions are the ceiling for everything Crios can see: the repository picker and the code indexed into project memory cover exactly the projects that token is a member of, and nothing more.
Requirements on the instance URL¶
Self-managed instances must be on public https
A self-managed Base URL must use https, and must not be localhost
or a loopback, private, or link-local address. That includes the cloud
metadata address 169.254.169.254. Test Connection, the repository
picker, and repository indexing all refuse to use a base URL that fails
this check, so an internal-only GitLab host cannot be connected. Crios
also checks the address a host name resolves to, every time it connects,
and follows a redirect only within the same host, so a name that points
at an internal address, or an instance that redirects somewhere else, is
refused too. An empty Base URL falls back to https://gitlab.com.
When GitLab refuses a request, Crios reports the status GitLab answered with (for example GitLab refused the access token (401)), never the text of GitLab's answer. When nothing answers, or the address is refused, the message is could not reach a GitLab instance at this URL.
Testing the connection¶
Test Connection authenticates against the instance and reports who the
token belongs to, as Name (@username), or just @username when the GitLab
profile carries no name. Run it after every token change: it is the quickest
confirmation that the token, its scope, and the base URL all line up.
With no access token saved, the test fails straight away and says the access token must be configured first. A token is what makes the connector count as configured: a Base URL on its own is not enough, and GitLab stays out of the Repository Kind list until a token resolves.
What members see¶
Members never see the token. On their Connectors page they see it as your organization's connection, an Access token, which reads Error while GitLab refuses it. Otherwise they see GitLab at the moment they create a project: on Projects → New project, Repository Kind offers GitLab alongside GitHub and Gitea (Built-in). Kinds whose connector is not configured are absent from the list; the built-in host is always there. The same choice appears in onboarding. See Creating a project.
Selecting GitLab turns the Repository field into a searchable picker reading Browse connected GitLab repositories…, with a Refresh button beside it for repositories created on GitLab moments ago. Type any part of a project's path to find it (Search GitLab repositories…):
- The list holds the GitLab projects the shared token is a member of, ordered by most recent activity and capped at the 300 most recent. A very large GitLab estate is not listed in full.
- Projects that are not public are marked (private).
- Picking one sets the project's repository URL and its default branch. You can still adjust the branch before clicking Create.
An empty picker reading No repositories available from the connected GitLab account. means the shared token is not a member of any project, not that the connector is broken. There is no free-text URL fallback for the GitLab kind, so when nothing appears, the token is what needs widening. How repositories are used once linked is covered in Repositories.
Changing or removing the connection¶
Reopen GitLab in Organization → Connectors → App credentials to rotate or replace what is stored:
- Rotating the token. Secret fields never display their stored value.
Access token reads
•••••• (unchanged)until you type something. Leave it untouched and Save & Apply keeps the stored token while applying your other edits. - Clearing a field. Emptying a field that currently holds a value marks it Will be cleared on save, so you can see what a save is about to remove.
The deployment's own environment settings apply only to the oldest organization. There, clearing the saved token can leave GitLab configured with the environment's token rather than disconnected.
Once no token resolves, GitLab disappears from Repository Kind for new projects and the picker stops returning anything. Projects already pointing at a GitLab repository keep their stored repository URL and default branch, and none of that is rewritten, but Crios can no longer reach GitLab on their behalf until a token is back.
Troubleshooting¶
| Symptom | Cause | Fix |
|---|---|---|
| GitLab missing from Repository Kind | No access token resolves for the connector | Save an access token under Organization → Connectors; a Base URL alone does not count as configured |
| Picker shows No repositories available from the connected GitLab account. | The token is not a member of any GitLab project | Give the token membership of the projects you need, or replace it with a group token that already covers them |
| Test Connection fails with an authentication error | The token expired or was revoked in GitLab | Create a fresh token with the api scope and paste it into Access token |
| Test Connection fails against a self-managed host | The Base URL is not https, points at a local, private, or link-local address, resolves to one, or redirects to another host |
Use the instance's public https address |
Watch the expiry date
GitLab access tokens carry an expiry date. When one lapses the picker comes back empty and Test Connection starts failing, which looks exactly like a permissions problem. Rotate the token in GitLab, paste the new value into Access token, and run Test Connection to confirm.