GitLab
Connect your GitLab repositories to Gitar
GitLab repositories can be connected to Gitar using a service account with personal access tokens.
Setup Instructions
Create a service account and generate a Service Account Personal Access Token. Ensure that the name of the service account is "Gitar Service".
Create a dedicated service account for Gitar integration to maintain security and isolation:

- Go to your GitLab instance admin area
- Create a new service account with name "Gitar Service"
- Grant appropriate permissions to repositories
Generate a Personal Access Token with the required scopes for the service account:

- Log in as the service account
- Go to User Settings → Access Tokens
- Click "Add New Token"
- Enter token name and set expiration
Select the following scopes for Gitar integration:

Required scopes:
read_user- Required for user authentication and integration with Gitarread_repository- Allows Gitar to read repository contents, branches, and metadataread_api- Enables reading GitLab API data for project information and settingswrite_repository- Required for creating pull requests and pushing code changesapi- Enables automatic webhook setup and project discovery
Click "Create personal access token" to generate the token. Save the generated token securely - you won't be able to see it again.
Before configuring the connection, you must add the service account as a member to each project that you want to enable with Gitar. The service account requires Maintainer role or higher.
- Navigate to your GitLab project
- Go to Settings → Members
- Click "Invite members"
- Search for your service account user
- Assign Maintainer role or higher
You must add the service account to each project individually that you want to enable with Gitar. Projects where the service account is not a member will not be available for selection.
Use the generated token to configure the connection with the following fields:

- GitLab Host: The hostname of your GitLab instance (e.g., gitlab.com, gitlab.example.com)
- Group/Namespace Path: The group or namespace path (e.g., "gitarcode" for gitlab.com/gitarcode)
- Project ID (Optional): Find your project ID in GitLab project settings
- Personal Access Token: Token needs all the scopes listed above
Configure Repository Access
After connecting GitLab, you can configure which repositories should receive Gitar webhook notifications.
Repository Configuration
Click the Configure button for GitLab to select which repositories you want to enable for webhook notifications.
