GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to add deploy keys to a specific GitLab project via the GitLab API. It is useful for automating the management of deploy keys, which are SSH keys that grant read-only or read-write access to a repository. Typical use cases include setting up continuous deployment pipelines or managing repository access programmatically.

Use Case Examples

  1. Adding a new deploy key to a project to enable automated deployment.
  2. Managing deploy keys across multiple projects in bulk.

Properties

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

Output

JSON

  • id - The unique identifier of the created deploy key.
  • title - The title of the deploy key.
  • key - The SSH key content.
  • created_at - Timestamp when the deploy key was created.
  • can_push - Boolean indicating if the deploy key has write access.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID or URL-encoded path is correctly specified in the path parameters to avoid 404 errors.
  • Verify that the GitLab API key has sufficient permissions to add deploy keys to the project.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include authentication failures, permission denied, or invalid project ID. Resolving these typically involves verifying credentials, permissions, and input parameters.

Links

Discussion