GitLab
Read and write GitLab projects, merge requests, issues and pipelines.
Connect it with: Sign in (OAuth), API key. GitLab's own developer documentation has the details.
What agents can do
Connect GitLab so the agents working your tasks can reach it. With it connected, they can:
- Clone, branch, commit and push code, and open merge requests for a task.
- Read and comment on issues and merge request discussions.
- Check CI/CD pipeline status and read job logs when a build fails.
- Search projects and code in your groups.
Before you start
- A GitLab account with Developer access or more on the projects agents should work in.
- A Jaah account. Anyone can add a personal secret; an organization secret needs an Org Owner or Admin.
Connect with GitLab
This is the quickest way in: you sign in to GitLab and approve what Jaah asks for. You never copy a key.
- In Jaah, open Secrets and select New.
- Search for GitLab and select its card.
- Give the secret a name you will recognize, such as the account or workspace it reaches, and choose who can use it (see Who can use it).
- Select Connect GitLab. GitLab's sign-in window opens.
- Sign in to GitLab if asked, check the access listed, and approve it.
- You land back in Jaah on the new secret, which reads Connected once its test passes.
If the button reads Jaah app not configured, this Jaah has no app registered at GitLab yet. Use an API key, or your own OAuth app, until it does.
Scopes Jaah requests
Jaah asks GitLab for these scopes, and no others. A scope marked optional is a checkbox on the Connect screen: untick it and agents simply cannot do that part.
| Scope | Why Jaah asks for it | Required |
|---|---|---|
api | Use the API: merge requests, issues, pipelines and project settings | Yes |
read_user | Read your profile, so the connection shows whose it is | Yes |
write_repository | Clone and push code over HTTPS | Yes |
Connect with an API key
Prefer this when you cannot sign in with GitLab — for example a service account, or a token your admin issued. On the Connect screen select Use an API key instead.
Find each value first:
- Personal access token: GitLab > your avatar > Edit profile > Access tokens > Add new token: name it Jaah, set an expiry date, tick api, read_user and write_repository, select Create token, then copy it - GitLab shows it once. A project or group access token (Settings > Access tokens) also works.
- Base URL (optional): Leave blank for GitLab in the cloud. For a self-managed GitLab, its https root (not /api/v4).
Then add it to Jaah:
- In Jaah, open Secrets, select New, and pick the GitLab card.
- Name the secret and choose who can use it.
- Select Use an API key instead.
- Fill in Personal access token, Base URL.
- Select Save. Jaah tests the secret straight away (see Test the connection).
Jaah encrypts what you type and never shows it again — not to you, and not to an admin.
Use your own OAuth app
Register your own OAuth app at GitLab when your company requires apps it controls, or before this Jaah has an app registered there.
- Create an OAuth app in GitLab's developer settings.
- Set its redirect URI to
https://app.jaah.ai/api/credentials/connect/callback(on your own Jaah, its console address followed by/api/credentials/connect/callback). - Give it the scopes in Scopes Jaah requests.
- Copy its client ID and client secret.
- In Jaah, start a new GitLab secret, select Use your own OAuth app, paste both values and select Connect GitLab.
The client secret is stored with the connection, encrypted, like any other secret value.
Test the connection
Select Test on the secret. Jaah makes one read-only call to GitLab with the stored values and shows the result on the secret's page. Jaah also tests automatically when you save or reconnect.
Who can use it
Every secret has an owner, and the owner decides who can use it:
- Personal — only your own tasks can use it. This is the default.
- Organization — every task in the organization can use it. Only Org Owners and Admins can choose this.
- Attached to a project — every task on that project can use it, whoever started the task. See Attach a secret to a project.
More on owners and access: How secrets work.
Use it in an agent session
An agent asks for the secret with its credential_get tool, by the secret's path, when it needs it, and gets the values for that one call. The path is the owner's prefix and the secret's name:
org/<name>for an organization secret,projects/<project>/<name>for one attached to a project,me/<name>for your personal one.
A signed-in connection hands the agent a live access_token, with access_token_expires_at. Jaah refreshes it before it expires, so an agent never handles a refresh token.
A key connection hands the agent its fields: token, base_url.
Tell the agent in your task description which secret to use, for example “use the GitLab secret org/gitlab”.
Manage, rotate or disconnect
Everything is on the secret's page under Secrets:
- Rotate a key: create a new key at the vendor first, then select Replace on the secret and paste it. Revoke the old key at GitLab once the test passes. Steps: Replace or delete a secret.
- Reconnect: when GitLab ends the grant (a password change, a revoked app, an expired refresh), the secret shows Needs reconnect. Select Reconnect and sign in again; agents get the new token on their next call.
- Disconnect: select Delete. The stored values are destroyed and agents lose access on their next call. To end access at GitLab's side too, revoke Jaah in GitLab's settings, or revoke or delete the key at GitLab.
Limitations
- Agents act as the account (or bot user, for a project or group token) that owns the connection.
- GitLab personal access tokens expire, at most a year after creation on GitLab SaaS; replace them before then.
- Sign-in connects GitLab SaaS only. For a self-managed GitLab, use a personal access token and Base URL.
- Agents can do only what the connected GitLab account and its granted scopes allow.
Troubleshooting
Test says GitLab rejected the token (401)
The token expired, was revoked or lacks the api scope. Create a new token and select Replace, or Reconnect a sign-in.
Agents get 403 pushing to a branch
The branch is protected, or the account has Reporter access only. Raise its role or allow it to push in Settings > Repository > Protected branches.
Test cannot reach your self-managed GitLab
Base URL must be its https root and reachable from the internet. Check it in a browser.
Still stuck? Select Test and read the result: it names the value GitLab refused and the status it answered.
FAQ
Personal, project or group token?
A project or group access token acts as a bot user limited to that project or group, which suits a team connection. A personal token acts as you.
Does the sign-in keep working?
Yes. GitLab's access tokens last two hours; Jaah refreshes them automatically.
Can Jaah or an admin see the key or token?
No. Jaah stores it encrypted and never shows it again. Only the tasks allowed to use the secret receive it, at the moment they ask for it.
Can I connect more than one GitLab account?
Yes. Add one secret per account, each with its own name, and tell the agent which one to use.