GitLab introduced personal access tokens (PAT) since version 8.8 and now (v10+) prefers this type of authentication for accessing the git repositories. Service users are strongly advised to switch from using username/password to using Personal Access Tokens (PAT) for GitLab.com.
GitLab can have users with different access level to a group or project. If the user's connected GitLab repositories to Jira are not accessible or commits are not showing for that user -- it's related to permission issues. This can be a per user, repository or a project level restriction.
If you encounter access permission issues, you will need to ask your Git administrator to grant you the required level of access to specific projects. If you are a Git administrator, you will need to setup a GitLab user with the minimum required permissions to view GitLab projects from Jira.
Take the following cases for example:
We recommend creating a specific GitLab user for the integration. This way, the GitLab user can have specific permissions to do the given tasks.
For minimum access (read-only) permissions:
This level of access allows the user to view commits for the specific repository.
For users who will be tasked with creating branches and merge requests:
This level of access allows the user to create/delete branches and create merge requests.
For more information, see GitLab Permissions .
This process requires an existing GitLab.com account. Multiple git repositories in a GitLab.com account will be connected via Git Integration for Jira add-on.
While instructions from GitLab works just fine, here are some specific instructions to get you up and running.
We recommend using the Auto-connect integration panel to connect multiple repositories from your GitLab.com account.
Configuring the Advanced settings is optional. However, admins/power users may set how the project listing is displayed.
The integration will use the relative REST API path to retrieve the list of tracked repositories.
The Custom API Path is called everytime the list of repositories is loaded, on a regular scheduled reindex and a manual reindex.
Gets a list of projects. This is the same as when no API path is specified.
Gets a list of projects for the specified user, <user_id>. johnsmith
Returns GitLab projects that have been starred by the connecting GitLab user.
The current user will be limited to the projects it's explicitly owned.
For more information on GitLab custom API paths, see GitLab API .
Read about JMESPath expressions on their website .
The maximum allowed length is 2000 characters or less.
[?contains(name, 'git') || contains(name, 'Slap') || contains(name, 'est')].
This is a filter based on text in the repository name. It will list repositories which contain the specified set of names. Do note that the declared string format is case-sensitive.
ON, will require users to provide PAT specific for branch and merge requests creation/deletion (via the developer panel on the Jira issue page). For more information on this feature, see Integration Settings: Require User PAT .
There will be a slight delay in adding this repository compared to others. It will show in the git configuration list eventually.
curl --header "Private-Token: XpigzF1JxMnAZ7mn9qgN" https://gitlab.com/api/v4/projects?membership=true
This process requires an existing GitLab git repository. For starters, the GitLab repository URL can be acquired on the repository project page. Choose between SSH or HTTPS.
Use this information to connect the GitLab git repository to your Jira server via Git Integration for Jira add-on: Manage Git Repositories > Connect to Git Repository.
This process requires a GitLab git repository and a PAT with
For GitLab Group, the user must have the Write permissions and the
Perform a commit to the newly-created branch to be ready for merge.
The pull request feature works the same as merge request.
To create a merge request and merge it to the main source (master):
If the 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.
Configure a PAT for the selected repository. Otherwise, the merge request creation will fail.
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 web portal.