GitLab API

GitlabTool

Actions1000

Overview

This node operation creates a deploy token for a specific group in GitLab using the GitLab API. It is useful for automating the creation of deploy tokens that allow read-only or write access to repositories within a group, facilitating continuous integration and deployment workflows.

Use Case Examples

  1. Automatically generate deploy tokens for a group to enable CI/CD pipelines to access repositories securely.
  2. Create deploy tokens programmatically for multiple groups to manage access credentials efficiently.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request, defaulting to GET but can be set to POST for this operation.
Path Parameters Parameters included in the API request path, specifically the group ID 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.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the group ID provided in the path parameters is correct and accessible by the authenticated user.
  • Verify that the authentication credentials (GitLab API key) are valid and have sufficient permissions to create deploy tokens.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • If the API request fails, review the HTTP method and path parameters to ensure they conform to the GitLab API specification for creating deploy tokens.

Links

Discussion