GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows users to create a new deploy key in GitLab 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 repositories. For example, it can be used in CI/CD pipelines to programmatically add deploy keys to projects for secure access.

Use Case Examples

  1. Automate adding deploy keys to multiple GitLab projects.
  2. Integrate deploy key creation into a deployment workflow to ensure secure repository access.

Properties

Name Meaning
Skip Authentication Option to skip API authentication for the request.
Authentication Type of authentication used for the API request, 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 but POST is used for creating deploy keys.
Parameter Schema Schema defining the parameters for the POST deploy keys operation.
Request Body Schema Schema defining the structure of the request body for creating a deploy key.
Request Path API endpoint path for creating deploy keys, fixed to /api/v4/deploy_keys.

Output

JSON

  • id - Unique identifier of the created deploy key.
  • title - 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 GitLab API key has sufficient permissions to create deploy keys.
  • Verify the baseUrl is correct and accessible.
  • Check that the request body matches the required schema for deploy keys.
  • Common error: 401 Unauthorized - indicates authentication failure; verify API key.
  • Common error: 400 Bad Request - indicates invalid input data; check request body format and required fields.

Links

Discussion