Skip to main content

GitLab

Prefer guided AI setup?

Instead of following these steps manually, you can use the AI Credential Assistant — describe what you want to connect and the AI will walk you through the setup step by step, tailored to your account.

Overview​

Connect your GitLab account to Nirvai to automate repository management, issues, merge requests, and CI/CD pipelines.

Supported Authentication Methods​

  • Personal Access Token (PAT) - Recommended for most use cases
  • Supports both GitLab.com and self-hosted GitLab instances

Prerequisites​

  • A GitLab account (GitLab.com or self-hosted)
  • Access to create Personal Access Tokens

Setup Instructions​

  1. Log in to your GitLab account
  2. Click your avatar in the top-right corner
  3. Select Edit profile
  4. In the left sidebar, select Access tokens
  5. Click Add new token
  6. Enter a descriptive name (e.g., "Nirvai Integration")
  7. Set an expiration date (optional but recommended)
  8. Select the required scopes:
    • api - Full access to the API (required for most operations)
    • read_user - Read user profile information
    • read_repository - Read repository data
  9. Click Create personal access token
  10. Copy the token immediately (it won't be shown again)
  11. In Nirvai, enter:
    • GitLab Server URL: https://gitlab.com (or your self-hosted URL)
    • Token: Paste your Personal Access Token

For Self-Hosted GitLab​

If you're using a self-hosted GitLab instance:

  1. Use your GitLab server URL (e.g., https://gitlab.yourcompany.com)
  2. Ensure your server allows API access
  3. The token creation process is the same as GitLab.com

Required Scopes​

ScopeDescriptionRequired For
apiFull API accessMost operations
read_userRead user infoUser-related actions
read_repositoryRead reposRepository access
write_repositoryWrite to reposPush, merge operations

Troubleshooting​

Common Issues​

  • 401 Unauthorized: Token may be expired or invalid. Generate a new token.
  • 403 Forbidden: Token may lack required scopes. Check scope permissions.
  • Connection Error (Self-hosted): Verify server URL is correct and accessible.
  • SSL Certificate Error: Ensure your self-hosted server has valid SSL certificates.

Token Expiration​

Personal Access Tokens can have expiration dates. If your integration stops working:

  1. Check if your token has expired
  2. Generate a new token with appropriate expiration
  3. Update the credential in Nirvai

Adapted from n8n documentation for Nirvai platform


Next Steps​

Got your credential? Connect it to an agent

Use the AI Tool Creator to turn this credential into agent-callable tools. Describe what your agent should be able to do and the AI investigates the API, configures the endpoints, and gives you a reviewable toolkit before saving anything.