Integration Guide

gitlab server logo GitLab Server EE/CE Integration1 Jira Cloud

This feature tracks added or deleted repositories from a remote GitLab server (EE/CE) and automatically imports those Git repository references into Jira.

GitLab v10+ stopped accepting username/password credentials for API access and will only recognize Personal Access Tokens (PAT) and OAuth authentications.  Service users are strongly advised to switch from using username/password for newer versions of GitLab Server (CE/EE) to using Personal Access Tokens.

For GitLab Server service users, they won't see the issue until they upgrade their GitLab Servers to version 10 and higher.  Git Integration for Jira add-on offers pre-v10 GitLab Server service users as a Legacy connection option.

helpful tip
BigBrassBand recommends a dedicated service user for this integration which has access permissions to the GitLab git repositories.

Connecting to a GitLab Server Jira Cloud

This process requires an existing GitLab Server EE or GitLab Server CE.  If your GitLab Server version is 10.2 and newer, a personal access token must be configured.

  1. On the Jira Cloud dashboard menu, go to Git > Manage Git Repositories.
  2. The git configuration page for connecting repositories is displayed.
  3. On the Auto-connect integration panel, click GitLab.
  4. git for jira cloud auto-connect panel - select gitlab
  5. On the Connect to GitLab screen, select the External service from the dropdown list.
  6. Choose:
    • GitLab Server (CE/EE) Legacy  –  if your GitLab Server version is 10.1 and older.
    • Connect to GitLab Server using Legacy authentication Enter the Host URL of the GitLab server.  Enter the username and password credentials for server authentication.  If 2FA is enabled in your GitLab Server, enter the personal access token as the password.
    • GitLab Server (CE/EE)  –  if your GitLab Server version is 10.2 and newer.
    • Connect to GitLab Server using 2FA authentication Enter the Host URL of the GitLab server.  Enter the username and PAT credentials for server authentication.  2FA must be enabled in your GitLab Server and PAT has been configured.
  7. On the following screens, import detected repositories then configure repository settings if required to complete the import process.
  8. helpful tip
    Currently the Git add-on scans only the repositories visible to the user which is used for scanning.  The repositories which are publicly visible (shared for all members or visible to the member with the admin rights) will not be scanned.  This will be supported in a future release.

The GitLab server is added to the repositories list as a connected server and is automatically reindexed.

Manage repositories of a connected GitLab server via the Git Repositories page under cog Actions  > Show tracked repositories to modify tracked repositories settings.

Repositories added or removed from GitLab server will be likewise added or removed from Jira Cloud.

helpful tip
The Git Integration for Jira add-on supports v3 and v4 of the GitLab API (in both Jira Cloud and Jira Server).
helpful tip
For newer GitLab authentication - in order to access a Git repository over HTTP, use the username as the username and the PAT for the password.
helpful tip
Admin/Power Users:
To pass the private access token (for example: XpigzF1JxMnAZ7mn9qgN) to an API call with
curl --header "Private-Token: XpigzF1JxMnAZ7mn9qgN"