GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves a specific GPG key associated with a user in GitLab by their user ID and the GPG key ID. It is useful for scenarios where you need to verify or manage a user's GPG keys programmatically, such as in automated security audits or user management workflows.

Use Case Examples

  1. Fetch a user's GPG key details to verify their identity in a CI/CD pipeline.
  2. Retrieve GPG key information for a user to display in an admin dashboard.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the 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 request is sent.
Method The HTTP method used for the request, defaulting to GET.
Path Parameters The path parameters required for the request, specifically the user ID and the GPG key ID.

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 - Indicates if the key can be edited.
  • user_id - The ID of the user to whom the GPG key belongs.

Dependencies

  • Requires GitLab API key credential for authentication.

Troubleshooting

  • Ensure the user ID and GPG key ID are valid integers and correspond to existing resources in GitLab.
  • If authentication is skipped, the request may fail due to lack of permissions.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 404 Not Found if the user or GPG key does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion