GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to add a GPG key to a specified user by their user ID. It is useful in scenarios where you need to programmatically manage user GPG keys in GitLab, such as automating user security configurations or integrating GitLab user management into a larger workflow.

Use Case Examples

  1. Adding a GPG key to a GitLab user to enable signed commits.
  2. Automating the process of updating user GPG keys in bulk for a GitLab instance.

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 requests are sent.
Method The HTTP method used for the API request, default is POST for this operation.
Path Parameters Parameters included in the API request path, specifically the user ID for this operation.

Output

JSON

  • id - The ID of the created GPG key.
  • key - The GPG key content.
  • created_at - Timestamp when the GPG key was created.
  • expires_at - Expiration date of the GPG key, if any.
  • can_edit - Indicates if the GPG key can be edited.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the user ID provided in the path parameters is valid and exists in the GitLab instance.
  • Verify that the API key used for authentication has sufficient permissions to add GPG keys to users.
  • Check the base URL to confirm it points to the correct GitLab instance.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated requests for this operation, which is uncommon.

Links

Discussion