GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node interacts with the GitLab API to create remote mirrors for a specified project. It is useful for automating the management of project mirrors in GitLab, such as setting up a remote mirror to synchronize repositories across different GitLab instances or external Git servers. For example, a user can automate the creation of a remote mirror for a project by providing the project ID and mirror details.

Use Case Examples

  1. Automate creation of a remote mirror for a GitLab project to keep repositories synchronized across different servers.
  2. Set up remote mirrors programmatically for multiple projects in a CI/CD pipeline.

Properties

Name Meaning
Skip Authentication If true, the node will skip using authentication for the API request.
Authentication The authentication method used for the API request, typically a GitLab API key.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method The HTTP method used for the API request.
Parameter Schema Defines the parameters required for the operation, including the project ID and the request body schema for creating a remote mirror.
Request Body Schema The schema defining the structure of the request body for creating a remote mirror.
Request Path The API endpoint path for creating a remote mirror on a project.
Path Parameters Collection of path parameters, specifically the project ID required to identify the project for which the remote mirror is created.

Output

JSON

  • id - The unique identifier of the created remote mirror.
  • url - The URL of the remote mirror repository.
  • enabled - Indicates if the remote mirror is enabled.
  • only_protected_branches - Indicates if only protected branches are mirrored.
  • keep_divergent_refs - Indicates if divergent refs are kept.
  • created_at - Timestamp when the remote mirror was created.
  • last_update_at - Timestamp of the last update to the remote mirror.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the provided authentication.
  • Verify that the authentication credentials (GitLab API key) are valid and have sufficient permissions to create remote mirrors.
  • Check the request body schema to ensure all required fields for creating a remote mirror are included and correctly formatted.
  • Common error messages may include authentication failures, permission denied errors, or invalid project ID errors. Resolving these typically involves verifying credentials, permissions, and input parameters.

Links

Discussion