Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation fetches the raw content of a file or its Large File Storage (LFS) pointer from a specified repository hosted on a Gitea server. It is useful when you need to retrieve the exact file data as stored in the repository, for example, to process configuration files, scripts, or any other raw assets directly within an n8n workflow.

Typical use cases include:

  • Downloading a specific version of a file from a repository branch or tag.
  • Accessing large files managed via LFS without cloning the entire repository.
  • Automating retrieval of raw files for deployment or analysis purposes.

Properties

Name Meaning
Owner The username or organization name that owns the repository.
Repo The name of the repository from which to fetch the file.
Filepath The path to the file to retrieve, formatted as {ref}/{filepath}. If no ref is provided, the default branch is assumed.
Ref Optional. The commit SHA, branch name, or tag name specifying the version of the file. Defaults to the repository’s default branch if omitted.

Output

The node outputs the raw content of the requested file in the json output field. This content represents the exact bytes of the file as stored in the repository or its LFS pointer. The output does not transform or parse the file content; it provides it as-is for further processing downstream.

If the file is managed by Git LFS, the node retrieves the LFS pointer file content rather than the actual large file binary data.

Dependencies

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

Troubleshooting

  • File Not Found: Ensure the owner, repo, filepath, and ref are correct. The filepath must include the ref prefix if applicable.
  • Authentication Errors: Verify that the API token credential is valid and has sufficient permissions to access the repository.
  • Default Branch Issues: If no ref is provided and the default branch cannot be determined, specify the branch explicitly.
  • Large Files: For very large files, ensure the Gitea server supports LFS and that the node is correctly handling LFS pointers.

Links and References

Discussion