GitLab API

GitlabTool

Actions905

Overview

This node operation allows creating a deploy token for a specific GitLab group via the GitLab API. It is useful for automating the generation 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. Create a deploy token for a GitLab group to allow automated deployment scripts to access the group's repositories.
  2. Generate a deploy token for a group to enable read-only access for a third-party service.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to POST for this operation.
Path Parameters Parameters to specify the group ID or URL-encoded path for which the deploy token is created.

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.
  • scopes - The scopes or permissions granted to the deploy token.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the group ID or path provided in the path parameters is correct and accessible by the authenticated user.
  • Verify that the API key credential has sufficient permissions to create deploy tokens for the specified group.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages include authentication failures (401 Unauthorized) and permission errors (403 Forbidden), which can be resolved by verifying credentials and user permissions.

Links

Discussion