GitLab Connector Settings Reference
This topic provides settings and permissions for the GitLab Connector.
In this topic:
- Limitations
- Name
- ID
- Description
- Tags
- URL Type
- Connection Type
- GitLab Account URL
- Authentication
- Username
- Password/Personal Access Token
- SSH Key
- Enable API access
Limitations
- One Harness Application cannot be in multiple repos.
- Before Harness syncs with your Git repo, it will confirm that all Harness' settings are in a valid state. If a connection is not working—for example, a connection to an Artifact Repo or Cloud Provider—Harness will not sync with your Git repo.
Name
The unique name for this Connector.
ID
See Entity Identifier Reference.
Description
Text string.
Tags
See Tags Reference.
URL Type
You can select Git Account or Git Repository.
You can add a connection to your entire Git account or just a repo in the account. Selecting a Git account enables you to use one Connector for all of your subordinate repos.
Later when you test this connection, you will use a repo in the account.
In either case, when you use the Connector later in Harness, you will specify which repo to use.
Connection Type
You can select HTTPS or SSH for the connection.
You will need to provide the protocol-relevant URL in GitLab Account URL.
If you use Two-Factor Authentication for your Git repo, you connect over HTTPS or SSH. HTTPS is required a personal access token.
ssh-keygen -t rsa -m PEM
The rsa
and -m PEM
ensure that the key is RSA. Next, follow the prompts to create the PEM key. For more information, see the ssh-keygen man page.To sync with GitLab, you will need to generate a SSH key pair and add the SSH key to your GitLab account. For more information, see Generating a new SSH key pair from GitLab.
GitLab Account URL
The URL for your Git repo. Ensure that it matches the Connection Type option you selected.
If you selected Repository in Type, enter the full URL for the repo.
If you selected Account in Type, enter the URL without the repo name. When you use this Connector in a Harness setting you will be prompted to provide a repo name.
Authentication
You can use a password/token for HTTPS credentials.
If you selected SSH as the connection protocol, you must add the SSH Key for use with the connection.
Username
The username git.
Password/Personal Access Token
A Harness Encrypted Text secret for the credentials of your GitLab user account.
The Personal Access Token requirements for Harness are: api
, read_repository
, write_repository
.

SSH Key
If you selected SSH as the connection protocol, you must add the SSH Key for use with the connection as a Harness Encrypted Text secret.
Enable API access
This option is required for using Git-based triggers, Webhooks management, and updating Git statuses. You'll need this setting if you use Harness Git Experience.
API Authentication
A Harness Encrypted Text secret for the credentials of your Gitlab user account.