Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Gitea server via its API to create repository-level variables. Specifically, the "Create Repo Variable" operation allows users to add a new variable to a specified repository owned by a given user or organization. This is useful for managing configuration or secret values that repositories can use in workflows or CI/CD pipelines.

Practical examples include:

  • Adding environment variables to a repository for automated deployment scripts.
  • Storing API keys or tokens as repository variables securely.
  • Managing feature flags or configuration toggles at the repository level.

Properties

Name Meaning
Owner The username or organization name that owns the repository where the variable will be created.
Repo The name of the repository to which the variable will be added.
Variablename The name/key of the variable to create within the repository.
Value The value assigned to the variable being created.

Output

The node outputs JSON data representing the response from the Gitea API after creating the repository variable. This typically includes details about the newly created variable such as its name and value confirmation (though exact fields depend on the API response). There is no indication that binary data is output by this node.

Dependencies

  • Requires access to a Gitea instance with API enabled.
  • Needs an API authentication token credential configured in n8n to authorize requests.
  • The base URL for the Gitea API must be provided in the credentials.
  • Uses the @devlikeapro/n8n-openapi-node package internally to build request properties from the OpenAPI specification.

Troubleshooting

  • Authentication errors: Ensure the API token credential is valid and has sufficient permissions to modify repository variables.
  • Repository not found: Verify that the owner and repository names are correct and accessible by the authenticated user.
  • Variable creation failure: Check if a variable with the same name already exists or if the variable name/value meet Gitea's requirements.
  • Network issues: Confirm that the Gitea server URL is reachable from the n8n instance.

Common error messages will generally come from the Gitea API and should be interpreted accordingly, e.g., 401 Unauthorized, 404 Not Found, or 422 Unprocessable Entity.

Links and References

Discussion