Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation creates 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 defaults programmatically. For example, a developer could use this node to quickly create a private repository with a specific license and default branch as part of a CI/CD pipeline or project scaffolding workflow.

Properties

Name Meaning
Auto Init Whether the repository should be auto-initialized (i.e., initialized with an initial commit).
Default Branch The default branch name for the repository (used during initialization and in templates).
Description A textual description of the repository being created.
Gitignores Gitignore template(s) to apply to the repository.
Issue Labels Label set to use for issues in the repository.
License License template to apply to the repository.
Name (Required) The name of the repository to create.
Object Format Name The object format used by the underlying git repository; options are "Sha 1" or "Sha 256".
Private Whether the repository should be private (true) or public (false).
Readme README file content or template to include 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, creation timestamps, visibility status, and configuration settings. There is no indication that binary data is output by this node.

Dependencies

  • Requires 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.
  • No additional external dependencies beyond the Gitea API and n8n's HTTP request capabilities.

Troubleshooting

  • Common Issues:

    • Authentication failures due to missing or invalid API tokens.
    • Repository name conflicts if a repository with the same name already exists for the user.
    • Insufficient permissions to create repositories on the Gitea server.
    • Invalid property values, e.g., unsupported license or gitignore templates.
  • Error Messages:

    • Unauthorized or 401 errors indicate problems with API credentials.
    • 422 Unprocessable Entity may occur if required fields like "Name" are missing or invalid.
    • 409 Conflict if a repository with the given name already exists.
  • Resolutions:

    • Verify API credentials and permissions.
    • Ensure the repository name is unique for the user.
    • Validate all input properties conform to expected formats and allowed values.

Links and References

Discussion