Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows users to list the push mirrors of a specific repository in Gitea. Push mirrors are remote repositories where changes from the original repository are automatically pushed, enabling synchronization across multiple locations. This operation is useful for developers or teams who maintain mirrored copies of their repositories for backup, redundancy, or distribution purposes.

Practical examples include:

  • Automatically syncing a repository hosted on Gitea with other Git hosting services.
  • Managing and auditing all configured push mirrors for a project.
  • Paginating through large lists of mirrors when many exist.

Properties

Name Meaning
Owner The username or organization name that owns the repository.
Repo The name of the repository for which to list push mirrors.
Page The page number of results to return (1-based). Useful for paginating through mirrors.
Limit The number of results per page to return. Controls the page size of the response.

Output

The output JSON contains an array of push mirror objects associated with the specified repository. Each object typically includes details such as the mirror URL, synchronization status, and configuration settings. This allows users to programmatically inspect and manage the mirrors.

If binary data were involved (not indicated here), it would represent files or attachments related to the mirrors, but this operation deals solely with JSON metadata.

Dependencies

  • Requires an API key credential for authenticating with the Gitea instance.
  • Needs the base URL of the Gitea server configured in the credentials.
  • Depends on the Gitea REST API endpoint /repos/{owner}/{repo}/mirrors to fetch push mirror information.

Troubleshooting

  • Common issues:

    • Incorrect owner or repo names will result in errors or empty responses.
    • Pagination parameters (page and limit) set to invalid values (e.g., negative numbers) may cause unexpected behavior.
    • Network or authentication failures if the API key or URL is misconfigured.
  • Error messages:

    • Unauthorized or 401 errors indicate missing or invalid API credentials.
    • 404 errors suggest the repository does not exist or the user lacks access.
    • Rate limiting errors may occur if too many requests are made in a short time; retry after some delay.

To resolve these, verify credentials, repository details, and ensure proper pagination values.

Links and References

Discussion