Skip to main content

Overview

Buckle connects AI agents to GitLab through OAuth. Agents can read projects, open and update issues and merge requests, comment, and manage branches. The gateway injects the token into every request, so your agent never sees it. GitLab uses your own GitLab OAuth application, on Buckle Cloud and self-hosted alike. Setup takes about five minutes, once.

What you will set up

  • Your own GitLab OAuth application with the required scopes
  • A GitLab connection that injects the token on every request
  • Per-agent, per-tool access, such as approval before merging

Connect GitLab

1

Create a GitLab OAuth application

In GitLab, open User settings > Applications and click Add new application. Name it Buckle, and select the scopes api, read_user, read_repository, write_repository, and read_registry.
GitLab User settings, Applications, Add new application form with Name Buckle, the Buckle redirect URI, Confidential ticked, and the api scope ticked.

The Add new application form in GitLab.

2

Add the redirect URI

In Buckle, open Settings > Apps > GitLab > Custom credentials and copy the Redirect URI. Paste it into the GitLab application’s Redirect URI and save the application.
GitLab application page for Buckle showing an example Application ID, the hidden Secret, the Buckle callback URL, Confidential Yes, and Buckle's five scopes.

After saving, GitLab shows the Application ID and the Secret. Copy the secret now, GitLab shows it only once.

3

Add your credentials and connect

Copy the GitLab Application ID and Secret into Custom credentials, click Save credentials, then click Connect GitLab and Authorize in GitLab.
Buckle connect window for GitLab showing Configuration required, the setup guide link, and the Configure credentials button.

The GitLab connect window in Buckle before credentials are added.

What agents can do

Controlling access

Grant the connection to each agent that needs it, and choose per tool what runs freely, what needs approval, and what’s blocked. Put Merge merge request and Delete branch behind approval. Organization rules add guardrails on top. A blocked request never reaches GitLab. To disconnect, remove the connection in Settings > Apps > GitLab, then revoke Buckle in GitLab under User settings > Applications.

FAQ

Yes. GitLab uses your own OAuth application on Cloud and self-hosted alike. Setup takes about five minutes, once.
No. The token stays in Buckle, and the gateway adds it to each request at the proxy. See How it works.
Click Connect GitLab again in Settings > Apps > GitLab and authorize. Agents with access use the new connection automatically.