Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows you to generate a new repository based on an existing template repository in Gitea. It is useful when you want to quickly create a new repository that inherits the structure, files, and settings from a predefined template repository owned by another user or organization.

Common scenarios include:

  • Automating project setup by cloning a standard template repository.
  • Creating multiple repositories with consistent initial content and configuration.
  • Setting up new projects with predefined labels, webhooks, branches, and topics.

For example, you can use this node to generate a new private repository for your team based on a public template repository that includes all necessary git hooks, labels, and default branch settings.

Properties

Name Meaning
Template Owner Name of the owner of the template repository (required).
Template Repo Name of the template repository to use (required).
Avatar Whether to include the avatar of the template repository (boolean, default: true).
Default Branch The default branch name for the new repository.
Description Description text for the new repository.
Git Content Whether to include the git content of the default branch from the template repo (boolean, default: true).
Git Hooks Whether to include git hooks from the template repository (boolean, default: true).
Labels Whether to include labels from the template repository (boolean, default: true).
Name Name of the new repository to create (required).
Owner The organization or user who will own the new repository (required).
Private Whether the new repository should be private (boolean, default: true).
Protected Branch Whether to include protected branches from the template repository (boolean, default: true).
Topics Whether to include topics from the template repository (boolean, default: true).
Webhooks Whether to include webhooks from the template repository (boolean, default: true).

Output

The node outputs JSON data representing the newly created repository object as returned by the Gitea API. This typically includes details such as repository ID, name, owner, description, visibility status, default branch, and URLs.

No binary data output is expected from this operation.

Dependencies

  • Requires an active connection to a Gitea instance via its API.
  • Requires an API authentication token credential configured in n8n to authorize requests.
  • The base URL of the Gitea server must be set in the credentials.
  • The node uses the Gitea REST API v1 endpoints to perform repository generation.

Troubleshooting

  • Authentication errors: Ensure the API token has sufficient permissions to create repositories under the specified owner.
  • Invalid template repository: Verify that the template owner and repository names are correct and accessible.
  • Name conflicts: If a repository with the same name already exists under the target owner, the creation will fail.
  • Network issues: Confirm that the Gitea server URL is reachable from the n8n environment.
  • Missing required fields: Make sure all required properties (template owner, template repo, name, owner) are provided.

Links and References

Discussion