GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves the GPG keys associated with a specific user in GitLab via the GitLab API. It is useful for scenarios where you need to manage or audit user GPG keys, such as verifying user identities or managing security credentials in a GitLab environment. For example, an administrator might use this to fetch all GPG keys for a user to ensure compliance with security policies.

Use Case Examples

  1. Fetch GPG keys for a user with ID 123 to verify their cryptographic signatures on commits.
  2. List all GPG keys for a user to audit their security credentials.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance to which the API request is sent.
Method HTTP method used for the API request, default is GET.
Query Parameters Optional query parameters for pagination, including page number and items per page.
Path Parameters Path parameters specifying the user ID whose GPG keys are being retrieved.

Output

JSON

  • id - The unique identifier of the GPG key.
  • key - The actual GPG public key string.
  • created_at - Timestamp when the GPG key was created.
  • expires_at - Timestamp when the GPG key expires, if applicable.
  • can_edit - Boolean indicating if the GPG key can be edited.
  • user_id - The ID of the user to whom the GPG key belongs.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the user ID provided in the path parameters is valid and exists in the GitLab instance.
  • Verify that the API key credential has sufficient permissions to access user GPG keys.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 401 Unauthorized (due to invalid or missing API key) and 404 Not Found (if the user ID does not exist).

Links

Discussion