GitLab credentials#
You can use these credentials to authenticate the following nodes:
Supported authentication methods#
- API access token
- OAuth2 (Recommended)
Related resources#
Refer to GitLab's API documentation for more information about the service.
Using API access token#
To configure this credential, you'll need a GitLab account and:
- The URL of your GitLab Server
- An Access Token
To set up the credential:
- In GitLab, select your avatar, then select Edit profile.
- In the left sidebar, select Access tokens.
- Select Add new token.
- Enter a Name for the token, like
n8n integration
. - Enter an expiry date for the token. If you don't enter an expiry date, GitLab automatically sets it to 365 days later than the current date.
- The token expires on that expiry date at midnight UTC.
- Select the desired Scopes. For the GitLab node, use the
api
scope to easily grant access for all the node's functionality. Or refer to Personal access token scopes to select scopes for the functions you want to use. - Select Create personal access token.
- Copy the access token this creates and enter it in your n8n credential as the Access Token.
- Enter the URL of your GitLab Server in your n8n credential.
Refer to GitLab's Create a personal access token documentation for more information.
Using OAuth2#
Note for n8n Cloud users
Cloud users don't need to provide connection details. Select Connect my account to connect through your browser.
If you're self-hosting n8n, you'll need a GitLab account. Then create a new GitLab application:
- In GitLab, select your avatar, then select Edit profile.
- In the left sidebar, select Applications.
- Select Add new application.
- Enter a Name for your application, like
n8n integration
. - In n8n, copy the OAuth Redirect URL. Enter it as the GitLab Redirect URI.
- Select the desired Scopes. For the GitLab node, use the
api
scope to easily grant access for all the node's functionality. Or refer to Personal access token scopes to select scopes for the functions you want to use. - Select Save application.
- Copy the Application ID and enter it as the Client ID in your n8n credential.
- Copy the Secret and enter it as the Client Secret in your n8n credential.
Refer to GitLab's Configure GitLab as an OAuth 2.0 authentication identity provider documentation for more information. Refer to the GitLab OAuth 2.0 identity provider API documentation for more information on OAuth2 and GitLab.