Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Gitea instance via its API to retrieve the contents of a repository at a specified path. It is useful for scenarios where you want to programmatically access files, directories, symlinks, or submodules within a Gitea repository. For example, you might use this node to fetch configuration files, read documentation, or analyze source code stored in a repository.

Properties

Name Meaning
Owner The owner (user or organization) of the repository from which to get contents.
Repo The name of the repository to query.
Filepath The path inside the repository pointing to the directory, file, symlink, or submodule to fetch.
Ref The commit SHA, branch name, or tag name to specify the version of the repository. Defaults to the repository’s default branch if not provided.

Output

The node outputs JSON data representing the contents found at the specified filepath in the repository. This can include metadata about files, directories, symlinks, or submodules such as names, types, sizes, and possibly content encoded in base64 if the item is a file. If binary data is returned (e.g., file contents), it will be included accordingly.

Dependencies

  • Requires a configured connection to a Gitea instance via an API key credential.
  • The node expects the base URL of the Gitea server and authentication credentials to be set up in n8n.
  • No additional external dependencies beyond the Gitea API are needed.

Troubleshooting

  • Common issues:
    • Incorrect owner, repo, or filepath values may result in "Not Found" errors.
    • Missing or invalid API credentials will cause authentication failures.
    • Specifying a ref that does not exist will lead to errors indicating the reference was not found.
  • Error messages:
    • 404 Not Found: Check that the owner, repo, filepath, and ref are correct.
    • 401 Unauthorized: Verify that the API key credential is valid and has sufficient permissions.
    • 400 Bad Request: Ensure all required parameters are provided and correctly formatted.

Links and References

Discussion