GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves the GPG keys associated with a specific user in GitLab via the GitLab API v4. It is useful for scenarios where you need to access or manage a user's GPG keys, such as verifying commit signatures or auditing user security settings. For example, a DevOps engineer might use this node to fetch GPG keys for a user to ensure their commits are properly signed.

Use Case Examples

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

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically an API key credential.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request.
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

  • gpg_keys - Array of GPG key objects associated with the specified user.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the user ID provided in the path parameters is valid and exists in the GitLab instance.
  • Verify that the API authentication token is correctly configured and has sufficient permissions to access user GPG keys.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages include 401 Unauthorized (authentication issues), 404 Not Found (invalid user ID), and 400 Bad Request (invalid query parameters). Resolving these involves verifying credentials, user ID, and query parameters respectively.

Links

Discussion