GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation allows creating a deploy token for a specific group in GitLab via the GitLab API. It is useful for automating the creation of deploy tokens that can be used for accessing repositories or container registries within a group, enabling CI/CD pipelines or deployment automation.

Use Case Examples

  1. Creating a deploy token for a GitLab group to allow automated deployment scripts to access the group's repositories.
  2. Automating the generation of deploy tokens for multiple groups in GitLab to streamline access management.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Defaults to false.
Authentication The authentication method used for the request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the request is sent. Defaults to https://gitlab.com.
Method The HTTP method used for the request. For this operation, it is POST.
Path Parameters The path parameters for the request, specifically the 'id' which is the ID or URL-encoded path of the group owned by the authenticated user.

Output

JSON

  • id - The unique identifier of the created deploy token.
  • name - The name of the deploy token.
  • username - The username associated with the deploy token.
  • token - The actual deploy token string used for authentication.
  • expires_at - The expiration date of the deploy token, if set.

Dependencies

  • Requires GitLab API key authentication credentials.

Troubleshooting

  • Ensure the 'id' path parameter is correctly set to the group's ID or URL-encoded path; otherwise, the API will return an error.
  • Authentication errors may occur if the GitLab API key is missing or invalid; verify credentials are correctly configured.
  • The deploy token creation may fail if the authenticated user does not have sufficient permissions on the specified group.
  • Check that the baseUrl is correctly set to the GitLab instance URL if using a self-hosted GitLab server.

Links

Discussion