Linking a GitLab or GitLab Self-Managed repository with Jira
Use the Jira DVCS connector to link a GitLab (hosted or self-managed) account to Jira Software Server. When linked to Jira Software, branches, commit messages and pull requests are all seamlessly referenced in Jira Software issues. This allows Jira Software to display information about your development activity in the corresponding issue.
Connecting Jira Software to GitLab
The connector needs permission from your DVCS account to access your account data. The connector does this through an OAuth 2 access token.
Add an OAuth 2.0 integration for your GitLab integration to use
For more information on OAuth 2.0 in Jira, see Integrating with OAuth 2.0.
To add a new OAuth 2.0 integration in Jira:
Go to Administration > System > OAuth 2.0.
Select Add new integration.
Enter your integration’s name.
Enter the authorization and token endpoint:
For https://gitlab.com, it will be:
For GitLab self-managed, it will be:
- Apply the
- Application ID as Client ID
- Application Secret as Client Secret
Using the OAuth 2.0 integration in DVCS
To use the OAuth 2.0 integration you created in DVCS:
- In Jira, go to Administration > Applications > DVCS Accounts.
- Click Link an account.
- In the Host drop-down, select GitLab or GitLab Self-Managed.
- For GitLab Self-Managed, enter your GitLab Host URL.
- For Gitlab, the Host URL is fixed to https://gitlab.com.
- In the Team or User Account, enter the target group and optional subgroups.
This is in the form of groupA/sub-groupA/sub-sub-groupA.
You can only have one group active as a configuration at one time. For example:
- If an existing integration is already using groupA, you won't be able to use groupA/sub-groupA in your new integration.
- Likewise, if an existing integration is using groupA/sub-groupA, you won't be able to use groupA in your new integration.
In the Client Configuration, select the created OAuth 2.0 integration. If you have only one, it will be automatically selected.
- Click Add.