GitLab API

GitlabTool

Actions905

Overview

This node operation authorizes access to a specific Conan package file within a GitLab project using the GitLab API. It is designed to handle authorization for files related to Conan packages, which are used in C++ package management. This operation is useful in scenarios where automated workflows need to manage or verify access permissions for Conan package files stored in GitLab projects, such as CI/CD pipelines or package distribution automation.

Use Case Examples

  1. Authorizing access to a Conan package file named 'conaninfo.txt' for a specific project and package version in GitLab.
  2. Automating the authorization process for Conan package files during a continuous integration workflow to ensure proper access control.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated access.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but can be set to PUT for this operation.
Path Parameters Collection of path parameters required to identify the specific Conan package file to authorize, including project ID, package name, version, username, channel, recipe revision, package reference, package revision, and file name.

Output

JSON

  • authorization_status - Status of the authorization request
  • message - Additional message or details about the authorization result

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure all required path parameters are correctly provided and URL-encoded if necessary.
  • Verify that the GitLab API key has sufficient permissions to authorize package files.
  • Check the baseUrl is correctly set to the GitLab instance URL if using a self-hosted GitLab.
  • Common error messages include 401 Unauthorized (invalid or missing API key), 404 Not Found (incorrect project or package identifiers), and 400 Bad Request (invalid parameters). Resolving these involves verifying credentials, parameters, and API endpoint correctness.

Links

Discussion