GitLab Connector Settings Reference
This topic provides settings and permissions for the GitLab Connector.
In this topic:
- URL Type
- Connection Type
- GitLab Account URL
- Password/Personal Access Token
- SSH Key
- Enable API access
- 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.
The unique name for this Connector.
See Tags Reference.
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.
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 PEMThe
-m PEMensure 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.
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.
The username git.
Password/Personal Access Token
A Harness Encrypted Text secret for the credentials of your GitLab user account.
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.
A Harness Encrypted Text secret for the credentials of your Gitlab user account.