Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows you to create a new repository within a specified organization on a Gitea server via its API. It is useful for automating repository creation workflows, such as setting up project repositories programmatically when onboarding new projects or teams. For example, you can use this node to quickly create a private repository with a default branch, license, and README file initialized, all configured according to your organization's standards.

Properties

Name Meaning
Org The name of the organization under which the repository will be created.
Name The name of the repository to create.
Auto Init Whether the repository should be auto-initialized (e.g., with an initial commit).
Default Branch The default branch name for the repository (used during initialization and templates).
Description A textual description of the repository.
Gitignores Specifies gitignore templates to apply to the repository.
Issue Labels Label set to use for issues in the repository.
License License template to apply to the repository.
Object Format Name The object format used by the underlying git repository; options are "sha1" or "sha256".
Private Whether the repository should be private (true) or public (false).
Readme Content or template for the README file in the repository.
Template Whether the repository should be marked as a template repository.
Trust Model The trust model applied to the repository; options include "default", "collaborator", "committer", and "collaboratorcommitter".

Output

The node outputs JSON data representing the newly created repository's details as returned by the Gitea API. This typically includes repository metadata such as its ID, URL, name, description, privacy status, default branch, and other configuration details. There is no binary output.

Dependencies

  • Requires access to a Gitea instance with API enabled.
  • Requires an API authentication token credential configured in n8n to authorize requests.
  • The base URL of the Gitea server must be provided in the credentials.
  • The node uses the Gitea REST API v1 endpoint /api/v1 for repository creation.

Troubleshooting

  • Authentication errors: Ensure that the API token credential is valid and has sufficient permissions to create repositories in the target organization.
  • Invalid organization name: Verify that the organization specified exists and that the authenticated user has rights to create repos there.
  • Repository name conflicts: If a repository with the same name already exists in the organization, the API will return an error.
  • Invalid property values: Check that properties like default_branch, license, gitignores, and trust_model are valid and supported by the Gitea instance.
  • Network or connectivity issues: Confirm that the Gitea server URL is reachable from the n8n environment.

Links and References

Discussion