Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Gitea server via its API to list all Git references (refs) for a specified repository. Git refs include branches, tags, and other pointers in the repository. This operation is useful when you want to retrieve all available branches or tags programmatically, for example, to display them in a UI, automate deployment workflows based on branch names, or synchronize repository metadata.

Practical examples:

  • Fetching all branches of a repository to trigger CI/CD pipelines.
  • Listing all tags to identify release versions.
  • Auditing repository refs for compliance or cleanup.

Properties

Name Meaning
Owner The owner (user or organization) of the repository.
Repo The name of the repository from which to list Git refs.

Output

The output JSON will contain an array of Git references for the specified repository. Each item typically includes details such as the ref name (e.g., refs/heads/main), the associated commit SHA, and possibly additional metadata depending on the Gitea API response.

If the node supports binary data output, it would generally relate to raw content fetched from the repository, but this operation focuses on JSON data listing refs only.

Dependencies

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

Troubleshooting

  • Authentication errors: Ensure the API token is valid and has sufficient permissions to read repository data.
  • Repository not found: Verify that the owner and repo names are correct and that the authenticated user has access rights.
  • Network issues: Confirm that the Gitea server URL is reachable from the n8n environment.
  • Empty results: If no refs are returned, check if the repository actually contains any branches or tags.

Links and References

Discussion