GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to create a new deploy key in GitLab by sending a POST request to the GitLab API endpoint `/api/v4/deploy_keys`. It is useful for automating the management of deploy keys in GitLab projects, enabling secure and automated access to repositories without manual intervention. For example, it can be used in CI/CD pipelines to add deploy keys programmatically.

Use Case Examples

  1. Automate adding deploy keys to GitLab projects during deployment.
  2. Manage deploy keys across multiple projects via workflow automation.

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 this operation.

Output

JSON

  • id - ID 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 base URL is correct and accessible.
  • Check that the request body contains all required fields as per the GitLab API specification for deploy keys.

Links

Discussion