GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves a specific deploy key from a GitLab project using the GitLab API. It is useful for scenarios where you need to access or verify deploy keys associated with a project, such as for automation scripts managing project access or auditing keys.

Use Case Examples

  1. Fetch details of a deploy key by providing the project ID and the deploy key ID to verify its properties or status.
  2. Use in CI/CD pipelines to dynamically check deploy keys before deployment.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public endpoints or testing.
Authentication Type of authentication used, default is GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Path Parameters Parameters to specify the project ID and deploy key ID for the API request.

Output

JSON

  • id - The unique identifier of the deploy key.
  • title - The title or name of the deploy key.
  • key - The actual SSH key string.
  • created_at - Timestamp when the deploy key was created.
  • can_push - Boolean indicating if the deploy key has write access.
  • fingerprint - Fingerprint of the deploy key for identification.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and deploy key ID are correct and accessible by the authenticated user.
  • Check that the GitLab API key has sufficient permissions to read deploy keys.
  • If skipping authentication, verify the endpoint is publicly accessible.
  • Common errors include 404 Not Found if the deploy key or project does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion