Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows migrating a repository from an external Git service into Gitea. It facilitates transferring repositories including their issues, labels, milestones, pull requests, releases, and wiki content. The migration can be configured to mirror the source repository with optional intervals for synchronization.

Common scenarios include:

  • Importing repositories from other Git hosting services (GitHub, GitLab, Gogs, etc.) into a Gitea instance.
  • Automating repository migration workflows as part of onboarding or consolidation processes.
  • Keeping a mirrored copy of an external repository within Gitea for backup or internal use.

Practical example:

  • Migrating a GitHub repository with all its issues, pull requests, and wiki pages into a private Gitea repository owned by a specific user or organization.

Properties

Name Meaning
Auth Password Password used for authentication on the source service during migration.
Auth Token Authentication token for accessing the source repository.
Auth Username Username for authenticating with the source service.
Aws Access Key Id AWS access key ID if the source repository uses AWS S3 for LFS storage.
Aws Secret Access Key AWS secret access key corresponding to the above ID.
Clone Addr (Required) URL of the source repository to clone/migrate.
Description Description for the new repository in Gitea.
Issues Whether to migrate issues from the source repository (true/false).
Labels Whether to migrate labels from the source repository (true/false).
Lfs Whether to migrate Git Large File Storage (LFS) objects (true/false).
Lfs Endpoint Custom endpoint for LFS if different from default.
Milestones Whether to migrate milestones (true/false).
Mirror Whether to enable mirroring of the repository after migration (true/false).
Mirror Interval Interval at which the mirror should update (e.g., "5m" for 5 minutes).
Private Whether the new repository should be private (true/false).
Pull Requests Whether to migrate pull requests (true/false).
Releases Whether to migrate releases (true/false).
Repo Name (Required) Name of the new repository in Gitea.
Repo Owner User or organization name that will own the migrated repository.
Service Source service type; options: Git, Github, Gitea, Gitlab, Gogs, Onedev, Gitbucket, Codebase.
Uid Deprecated property, kept for backward compatibility.
Wiki Whether to migrate the wiki pages (true/false).

Output

The node outputs JSON data representing the result of the repository migration request. This typically includes details about the newly created repository such as its ID, URL, owner information, and migration status.

If the migration is successful, the output JSON confirms the repository has been created or mirrored according to the specified parameters.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating with the target Gitea instance.
  • The node interacts with the Gitea API endpoint configured via credentials.
  • The source repository must be accessible via the provided clone address and authentication details.
  • No additional environment variables are explicitly required beyond standard n8n credential setup.

Troubleshooting

  • Authentication errors: Ensure that the provided username, password, or token for the source service are correct and have sufficient permissions.
  • Invalid clone address: Verify the clone URL is reachable and correctly formatted.
  • Permission denied: The authenticated user on Gitea must have rights to create repositories under the specified owner.
  • Mirror interval format: If using mirroring, ensure the interval string is valid (e.g., "5m", "1h").
  • Missing required fields: clone_addr and repo_name must be provided; otherwise, the request will fail.
  • Service mismatch: Confirm the selected source service matches the actual origin of the repository to avoid migration errors.

Links and References

Discussion