Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows users to create a fork of an existing repository on a Gitea server. Forking a repository is useful when you want to create a personal copy of someone else's project to freely experiment with changes without affecting the original repository. Common scenarios include contributing to open-source projects, experimenting with new features, or backing up repositories under your own account or organization.

For example, a developer can use this node to fork a public repository owned by another user or organization into their own account or into an organization they belong to, enabling them to work independently on the codebase.

Properties

Name Meaning
Owner The username or owner of the repository you want to fork.
Repo The name of the repository to fork.
Name (Optional) The desired name for the newly created forked repository.
Organization (Optional) The name of the organization where the fork should be created instead of the user's personal account.

Output

The node outputs JSON data representing the newly created forked repository. This typically includes details such as the repository ID, name, owner information, URLs, and other metadata returned by the Gitea API upon successful creation of the fork.

No binary data output is involved in this operation.

Dependencies

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

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Specifying a non-existent owner or repository name will result in errors indicating the repository was not found.
    • Lack of permissions to fork into a specified organization may cause authorization errors.
    • Providing invalid or duplicate fork names might lead to conflict errors.
  • Error messages and resolutions:

    • 401 Unauthorized: Check that the API token is valid and has sufficient permissions.
    • 404 Not Found: Verify the owner and repository names are correct and accessible.
    • 403 Forbidden: Ensure the authenticated user has permission to fork into the target organization.
    • 422 Unprocessable Entity: Confirm the fork name does not conflict with existing repositories.

Links and References

Discussion