GitLab API icon

GitLab API

Gitlab

Actions880

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 to manage access permissions for different environments or services.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used for the request, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Parameters to be included in the request path, specifically the group ID for which the deploy token is created.

Output

JSON

  • id - The ID of the created deploy token.
  • name - The name of the deploy token.
  • token - The actual deploy token string used for authentication.
  • scopes - The scopes or permissions granted by the deploy token.
  • created_at - Timestamp when the deploy token was created.

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 if using a self-hosted GitLab server.
  • Common error messages include 401 Unauthorized (invalid or missing authentication), 404 Not Found (group ID does not exist), and 400 Bad Request (invalid parameters). Resolving these involves correcting credentials, verifying group ID, and ensuring request parameters meet API requirements.

Links

Discussion