Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node interacts with a Gitea API to add a GPG key to the current authenticated user. Specifically, it allows users to post an armored public GPG key (and optionally an armored signature) to their user profile in Gitea. This is useful for developers or teams who want to manage GPG keys programmatically within their CI/CD pipelines or automation workflows, ensuring secure commit signing and verification.

Practical examples include:

  • Automatically adding a new GPG key when a developer joins a project.
  • Rotating GPG keys by removing old ones and adding new ones via automation.
  • Integrating GPG key management into onboarding workflows.

Properties

Name Meaning
Armored Public Key The armored (ASCII encoded) GPG public key to add to the current user's profile.
Armored Signature (Optional) An armored signature associated with the GPG key being added.

Output

The node outputs JSON data representing the response from the Gitea API after posting the GPG key. This typically includes details about the newly added GPG key such as its ID, fingerprint, and creation date.

No binary data output is involved.

Dependencies

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

Troubleshooting

  • Invalid or missing API token: The node will fail if the API token is invalid or not provided. Ensure the credential is correctly set up.
  • Malformed GPG key: If the armored public key is incorrectly formatted, the API may reject the request. Verify the key format before sending.
  • Permission issues: The API token must have sufficient permissions to modify the current user's GPG keys.
  • Network errors: Check connectivity to the Gitea server and ensure the base URL is correct.

Common error messages might include HTTP 401 Unauthorized (invalid token), 400 Bad Request (invalid key format), or 403 Forbidden (insufficient permissions).

Links and References

Discussion