Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows you to create a new repository for the current authenticated user on a Gitea server. It is useful when automating repository management tasks such as initializing new projects, setting up templates, or configuring repository settings programmatically. For example, you can use this node to quickly create a private repository with a specific license and default branch, or to initialize a public template repository with predefined issue labels and gitignore files.

Properties

Name Meaning
Auto Init Whether the repository should be auto-initialized (boolean: true or false)
Default Branch The default branch name of the repository (string)
Description Description text for the repository
Gitignores Gitignore template(s) to apply to the repository
Issue Labels Label set to use for issues in the repository
License License type to apply to the repository
Name (Required) Name of the repository to create
Object Format Name Object format used by the underlying git repository; options: "sha1" or "sha256"
Private Whether the repository is private (boolean: true or false)
Readme Readme content or template for the repository
Template Whether the repository is a template repository (boolean: true or false)
Trust Model Trust model for the repository; options: "default", "collaborator", "committer", "collaboratorcommitter"

Output

The node outputs JSON data representing the newly created repository object returned from the Gitea API. This typically includes details such as repository ID, name, description, visibility status, URLs, creation timestamps, and other metadata about the repository. There is no binary output.

Dependencies

  • Requires an active connection to a Gitea instance via its REST API.
  • Requires an API authentication token credential configured in n8n to authorize requests.
  • The base URL for the Gitea API must be provided in the credentials configuration.

Troubleshooting

  • Authentication errors: Ensure the API token has sufficient permissions to create repositories for the user.
  • Validation errors: Required fields like "Name" must be provided; invalid values for options (e.g., trust model) may cause errors.
  • Network issues: Verify that the Gitea server URL is reachable and correct.
  • Permission denied: The authenticated user must have rights to create repositories.
  • API changes: If the Gitea API version changes, some properties might become deprecated or behave differently.

Links and References

Discussion