GitLab Server EE/CE Integration1 Jira Server
Introduced in v2.9.4 of the Git add-on, 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
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.
BigBrassBand recommends a dedicated user for this integration
which has access permissions to the GitLab git repositories.
Connecting to a GitLab Server Jira Server
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.
- On the Jira Server dashboard menu, go to Git > Manage Git Repositories.
- The git configuration page for connecting repositories is displayed.
- On the Auto-connect integration panel, click GitLab.
- On the Connect to GitLab screen, select the External service from
the dropdown list.
The Advanced option is only available for GitLab Servers. Click
Advanced to expand the option to enter the query string parameters.
This setting is used with integration to retrieve list of tracked repositories.
Set a filter that will only load some cloned repositories which can be viewed
via Actions > Show tracked repositories in the Manage git
repositories configuration screen.
Click Connect. THe Git add-on will import detected
GitLab Enterprise repositories.
- GitLab Server (CE/EE) Legacy – if your GitLab
Server version is 10.1 and older.
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.
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.
After the import process, the Settings dialog is displayed:
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.
- On the Integration Settings, setting the Require User PAT
ON, will require users to provide PAT
specific for branch and
merge requests (via the
the Jira issue page). For more information on this feature, see
Integration Settings: Require User PAT .
and Repository Browser
to enable/disable these features.
- Set Project Permissions according to your organization's
project association rules.
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
Show tracked repositories to modify tracked repositories settings.
Repositories added or removed from GitLab server will be likewise added or removed from Jira Server.
The Git Integration for Jira add-on supports v3 and v4 of the GitLab API
(in both Jira Cloud and Jira Server).
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.
To pass the private access token (for example: XpigzF1JxMnAZ7mn9qgN) to an API call with GitLab.com:
curl --header "Private-Token: XpigzF1JxMnAZ7mn9qgN" https://gitlab.com/api/v4/projects?membership=true
Setting Up GitLab Server Web Links Jira Server
The Git Integration for Jira add-on automatically configures web linking for GitLab CE/EE git repositories.
The merge request feature works the same as pull request.
To create a merge request and merge it to the main source (master):
- On your Jira Server, open the Jira issue where your previously created a branch.
- On the developer panel under Git Source Code,
click Create merge request.
- The following dialog is displayed:
- Select Repository from the list.
If there are several repositories with
the same name, the listed GitLab repositories will have their names attached
with a GitLab owner name. For example,
- Choose the newly-created branch as the Source branch.
- Set master as the Target branch.
- Enter a descriptive title or leave it as is (recommended).
Require User PAT option
is enabled and a user PAT isn't configured yet for the selected repository
via Repository Browser, the dialog below is displayed instead:
If an invalid PAT was configured for the selected repository, the merge request
creation process will fail.
Click Create to create the merge request.
The merge request is listed on the developer panel of the Jira issue page.
The merge request is also ready for approval by the reviewers in your GitLab
CE/EE web portal.