GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows users to add GPG keys to their GitLab user account via the GitLab API. It is useful for automating the management of GPG keys for user authentication and signing commits in GitLab repositories. For example, a developer can use this node to programmatically add a new GPG key to their GitLab profile as part of a CI/CD pipeline or user setup process.

Use Case Examples

  1. Adding a new GPG key to a GitLab user account to enable commit signing.
  2. Automating the update of GPG keys for multiple users in an organization.

Properties

Name Meaning
Skip Authentication Determines whether to skip the authentication process for the API request.
Authentication Specifies the authentication method to use for the API request.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request (GET, POST, PUT, DELETE, HEAD, PATCH).

Output

JSON

  • id - The unique identifier of the added GPG key.
  • key - The GPG key content added to the user account.
  • created_at - Timestamp when the GPG key was created.
  • expires_at - Timestamp when the GPG key expires, if applicable.

Dependencies

  • GitLab API authentication credentials

Troubleshooting

  • Ensure the GitLab API credentials are correctly configured and have the necessary permissions to add GPG keys.
  • Verify the baseUrl is correct and accessible.
  • Check that the request body contains a valid GPG key in the expected format.
  • Common error messages may include authentication failures, invalid key format, or permission denied errors. Resolving these typically involves verifying credentials, correcting the key format, and ensuring the user has appropriate API access rights.

Links

Discussion