About GitLab
GitLab is a DevOps platform for source control, issues, merge requests, and CI/CD. Connect gitlab.com or a self-managed instance with your GitLab OAuth application or a personal access token. Workflows run with the permissions of the user who authorizes the connection. Authentication: OAuth with a customer-owned confidential application, or a personal access token. Serval encrypts credentials and automatically refreshes OAuth tokens. Data sync: No background sync and no webhooks. Serval contacts GitLab only on demand - when a workflow runs, and when health checks run after connecting or from the integration settings page.What the GitLab integration enables
Connect with OAuth
- Add a GitLab connection in Serval and select Connect with your GitLab OAuth app.
- Enter your GitLab instance domain. Self-managed OAuth endpoints must use HTTPS and be reachable from Serval; private network destinations may be blocked by the deployment’s network policy.
- In GitLab, open Edit profile → Applications and create a confidential application. Copy the Callback URL shown in Serval into the application’s redirect URI.
- Enable read_api for read-only workflows, or api for workflows that create or change resources. Select the same access level in Serval.
- Enter the application’s Application ID and Application secret, select Connect GitLab, and authorize access in GitLab.
Get a personal access token
Serval needs a GitLab personal access token. Choose the scope based on what your workflows will do: read_api for read-only workflows, or api if workflows will create or update GitLab resources. GitLab’s official guide is here: GitLab personal access tokens documentation.Open your token settings
Go to Access Tokens
Add a new token
Name the token and set an expiration
Select scopes
Create and copy the token
Connect in Serval
Open the GitLab connect form
Enter the Instance Domain (optional)
Paste your Personal Access Token
Submit the form
Verifying the connection
The connection ships two health checks that make live calls to your GitLab instance. They run automatically after connecting (if enabled) and on demand from the integration settings page:- Validate GitLab API Connection: makes a lightweight call to your instance to confirm the credential authenticates against the configured domain. Success: “Successfully connected to GitLab API. Instance version: [version].” Failure: “Unable to connect to GitLab API. Please verify your GitLab credentials are valid and your instance domain is correct.”
- List GitLab Projects: lists a small sample of projects (up to 5) to confirm the token actually has API read access. Success: “Successfully listed GitLab projects. Found [number] project(s).” A count of 0 still passes - it means the token works but its user has no visible projects. Failure: “Unable to list GitLab projects. Please verify your token has the appropriate scopes (read_api or api).”
Gotchas and troubleshooting
The token must match the instance domain
The token must match the instance domain
A connection can save successfully but still not work
A connection can save successfully but still not work
Token scope limits what workflows can do
Token scope limits what workflows can do
Workflow request paths are passed through exactly as written
Workflow request paths are passed through exactly as written
Rotating your personal access token
Rotating your personal access token
Need help? Contact support@serval.com for assistance with your GitLab integration.

