GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves a specific Go module version file (.mod) from a GitLab project's Go proxy package registry. It is useful for developers or CI/CD pipelines that need to fetch Go module metadata directly from GitLab's package registry for dependency management or auditing purposes.

Use Case Examples

  1. Fetching the .mod file for a specific Go module version in a GitLab project to verify module dependencies.
  2. Automating retrieval of Go module metadata during build processes to ensure correct module versions are used.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication when making the API request.
Authentication Specifies the authentication method to use if authentication is not skipped.
baseUrl The base URL of the GitLab instance to send the request to.
Method The HTTP method to use for the request (GET, POST, PUT, DELETE, HEAD, PATCH).
Query Parameters Query parameters to include in the request, specifically the Go module name.
Path Parameters Path parameters required for the request, including the project ID or full path and the Go module version.

Output

JSON

  • id - The project ID or full path of the project.
  • module_name - The name of the Go module.
  • module_version - The version of the Go module.
  • content - The content of the Go module version file (.mod) retrieved from the GitLab API.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID or full path is correct and accessible with the provided credentials.
  • Verify the Go module name and version are correctly specified and exist in the project's Go proxy registry.
  • Check that the base URL is correct for the GitLab instance being accessed.
  • If skipping authentication, ensure the requested resource is publicly accessible; otherwise, authentication is required.
  • Common error messages may include 404 Not Found if the project or module version does not exist, or 401 Unauthorized if authentication fails.

Links

Discussion