GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves an archive of a project's repository from GitLab using the GitLab API. It is useful for downloading the repository content as an archive file, optionally specifying commit SHA, archive format, subfolder path, and whether to include LFS blobs. Practical use cases include backing up project repositories, downloading specific versions of the codebase, or extracting parts of the repository for analysis or deployment.

Use Case Examples

  1. Download the latest repository archive of a project by specifying the project ID.
  2. Download a repository archive at a specific commit SHA to review or deploy that version.
  3. Download a subfolder of the repository as an archive for focused analysis or deployment.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Defaults to false.
Authentication The authentication method used for the request, hidden unless Skip Authentication is false. Defaults to GitLab API key authentication.
baseUrl The base URL of the GitLab instance. Defaults to https://gitlab.com.
Method HTTP method to use for the request. Defaults to GET.
Query Parameters Optional query parameters for the request including commit SHA, archive format, subfolder path, and whether to include LFS blobs.
Path Parameters Path parameters for the request, specifically the project ID or URL-encoded path.

Output

JSON

  • archive - The downloaded repository archive content or metadata about the archive.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID is correct and accessible with the provided authentication.
  • Verify that the commit SHA (if provided) exists in the project repository.
  • Check that the base URL is correct for the GitLab instance being accessed.
  • If skipping authentication, ensure the repository is public or accessible without credentials.
  • Common errors include 404 Not Found if the project or commit SHA does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion