Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node allows an administrator to create a new repository on a Gitea server via its API. It is useful in scenarios where automated repository provisioning is needed, such as setting up project templates, initializing repositories for new users, or managing repositories programmatically within CI/CD pipelines.

For example, an admin can use this node to create a private repository with a default branch, license, and issue labels pre-configured, streamlining the onboarding process for new projects or teams.

Properties

Name Meaning
Username The username of the user who will own the created repository.
Auto Init Whether the repository should be auto-initialized (boolean).
Default Branch The default branch name of the repository (used during initialization and in templates).
Description A 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 template to apply to the repository.
Name The name of the repository to create.
Object Format Name The object format of the underlying git repository; options are "sha1" or "sha256".
Private Whether the repository is private (boolean).
Readme Readme template/content to initialize the repository with.
Template Whether the repository should be marked as a template repository (boolean).
Trust Model The trust model of 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, owner information, creation timestamps, and configuration settings.

No binary data output is indicated.

Dependencies

  • Requires an API key credential for authenticating with the Gitea server.
  • The node expects the base URL of the Gitea instance to be configured in the credentials.
  • The Gitea API must be accessible from the n8n environment.

Troubleshooting

  • Authentication errors: Ensure the API key credential is valid and has sufficient permissions to create repositories.
  • Permission denied: The specified username must exist and the authenticated user must have admin rights to create repositories on behalf of that user.
  • Invalid parameters: Check that required fields like username and name are provided and correctly formatted.
  • Network issues: Verify connectivity to the Gitea server and correct base URL configuration.
  • API version mismatch: Confirm the Gitea server API version supports the used endpoints and parameters.

Links and References

Discussion