Skip to main content

GitLab

GitLab connector form

Standard connector form, described in general in Connectors. GitLab instances from version 14 onward are supported, both self-hosted and gitlab.com.

FieldWhat to enterExample
Connector API URLthe instance address with the /api/v4 suffixhttps://gitlab.company.com/api/v4
Usernamethe login of the account the token was generated onq247-service
Personal access tokena token with read scopesglpat-xxxxxxxx or $$GITLAB_TOKEN

Omitting the /api/v4 suffix in the address is the most common mistake with this connector, and shows up as an Error status.

Both credential fields accept, instead of a value, an environment variable name with the $$ prefix, for example $$GITLAB_TOKEN. In that case, only the variable name is saved in Q247, and the token stays on the plugin host; the rules and pitfalls of this notation are described in Connectors.

The token is generated in GitLab, in the user settings, in the Access Tokens section. The required scopes are read_user, read_api and read_repository. If the instance uses groups, the account must belong to all the groups whose repositories are to be analyzed.

See also