It is necessary to understand basic principles. There is either generic Git support with basic Git functionalities but without any advanced integrations like merge requests, branches and so on.

You have to choose proper way based on available options. If Gitlab is hosting intended repositories, you shall use Gitlab auto-connect in Jira Git plugin. Use generic Git connect only in custom and edge cases.

Recommended setup:

Gitlab repositories integration

How does it work:

Getting service account in Gitlab

These instructions are made for TDS users. Getting service account into your local Gitlab installations will be similar in principle, however you need to adapt them on your environment.

Preparing service account in TDS GItlab by end users

Preparing service account in TDS GItlab by TDS support/consultancy team

Setting Git integration in Jira by administrators

Generic Git repositories integration

Integrate Gitlab project into Jira

More details can be found in Gitlab documentation