Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node integrates with a Gitea instance to manage repositories programmatically. Specifically, the "Repo Add Push Mirror" operation allows users to configure a repository to push its changes automatically to a remote mirror repository. This is useful for backup purposes, redundancy, or syncing codebases across different hosting services.

Common scenarios include:

  • Automatically mirroring a repository to another Git server.
  • Keeping a backup of your repository in a different location.
  • Syncing repositories between teams or organizations.

For example, after creating a repository in Gitea, you can use this node to set up a push mirror that regularly pushes commits to a remote Git server, ensuring both repositories stay synchronized.

Properties

Name Meaning
Owner The owner (user or organization) of the repository where the mirror will be added.
Repo The name of the repository to which the push mirror will be added.
Interval The time interval at which the mirror syncs automatically (e.g., every few minutes).
Remote Address The URL or address of the remote repository to which the mirror will push changes.
Remote Password Password used for authentication with the remote repository (if required).
Remote Username Username used for authentication with the remote repository (if required).
Sync On Commit Boolean flag indicating whether the mirror should sync immediately on each commit.

Output

The node outputs JSON data representing the result of the push mirror creation or update operation. This typically includes details about the configured mirror such as its ID, status, and configuration parameters.

No binary data output is involved in this operation.

Dependencies

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

Troubleshooting

  • Authentication errors: Ensure the API token or credentials are valid and have sufficient permissions to modify repository settings.
  • Invalid repository or owner: Verify that the specified owner and repository names exist and are accessible by the authenticated user.
  • Remote repository connection issues: Check that the remote address, username, and password are correct and that the remote server is reachable.
  • Interval format problems: If the interval is not accepted, verify it matches expected formats (e.g., cron syntax or duration strings).
  • Sync on commit not working: Confirm that the repository supports webhooks or triggers for immediate sync, and that the feature is enabled on the Gitea server.

Links and References

Discussion