Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Gitea instance via its API to list Git references (branches, tags, etc.) in a specified repository. It is useful for workflows that need to dynamically retrieve or verify Git refs within repositories hosted on Gitea, such as automation scripts for CI/CD pipelines, release management, or repository analysis.

For example, you might use this node to:

  • Fetch all branches or tags matching a certain pattern before triggering deployment.
  • Validate if a specific branch or tag exists before running further steps.
  • List refs to display or log repository state in an automated report.

Properties

Name Meaning
Owner The owner (user or organization) of the repository to query.
Repo The name of the repository from which to list Git references.
Ref Part or full name of the Git reference to filter by (e.g., branch/tag).

Output

The node outputs JSON data representing the list of Git references matching the provided ref filter in the specified repository. Each item typically includes details about the ref such as its full name and associated commit SHA.

No binary data output is involved.

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 for the Gitea API must be set in the node credentials.

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Providing wrong repository owner or repo names will result in "not found" errors.
    • Using an invalid or non-existent ref filter may return empty results.
  • Error messages:

    • Authentication errors: Check that the API token is valid and has sufficient permissions.
    • 404 Not Found: Verify the owner and repo names are correct and accessible.
    • Empty response: Confirm the ref filter matches existing refs; try broadening the filter.

Links and References

Discussion