Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Gitea server via its API, specifically to retrieve an archive of a repository. The "Repo Get Archive" operation allows users to download a compressed archive (such as a ZIP or TAR file) of a specific git reference (branch, tag, or commit) from a repository hosted on Gitea.

Common scenarios include:

  • Automating backups of repositories by downloading their archives.
  • Fetching source code snapshots for deployment or analysis.
  • Integrating repository content retrieval into CI/CD pipelines.

For example, a user can specify the owner and repository name along with a branch name appended with an archive format like master.zip to download the latest master branch as a ZIP archive.

Properties

Name Meaning
Owner The username or organization that owns the repository.
Repo The name of the repository from which to download the archive.
Archive The git reference combined with the desired archive format, e.g., master.zip or v1.0.tar.gz.

Output

The node outputs the downloaded archive data. This is typically binary data representing the compressed archive file of the specified repository reference. The output can be used downstream in workflows for saving to disk, further processing, or deployment.

Dependencies

  • Requires access to a Gitea instance with API enabled.
  • Needs an API authentication token credential configured in n8n to authorize requests.
  • The base URL of the Gitea server must be provided in the credentials configuration.

Troubleshooting

  • Invalid Owner or Repo: If the specified owner or repository does not exist, the API will return an error. Verify the spelling and existence of the repository.
  • Incorrect Archive Format: The archive string must correctly specify a valid git reference and supported archive format (e.g., .zip, .tar.gz). Using unsupported formats may cause errors.
  • Authentication Errors: Ensure the API token credential is valid and has sufficient permissions to access the repository.
  • Network Issues: Connectivity problems to the Gitea server will prevent archive retrieval.

Links and References

Discussion