Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows you to add a new SSH key to the current user in Gitea. It is useful when you want to programmatically manage SSH keys associated with a user's account, for example, to enable secure Git operations without manual intervention. Typical use cases include automating deployment setups, managing access keys for CI/CD pipelines, or synchronizing user keys across multiple systems.

Properties

Name Meaning
Key The armored SSH public key string that you want to add to the user's account.
Read Only Boolean flag indicating if the key should have read-only access (true) or read/write.
Title A descriptive title for the SSH key to help identify it later.

Output

The node outputs JSON data representing the newly added SSH key object as returned by the Gitea API. This typically includes details such as the key's ID, title, fingerprint, and access permissions. There is no binary output.

Dependencies

  • Requires an API key credential for authenticating with the Gitea instance.
  • The node expects the base URL of the Gitea server to be configured in the credentials.
  • The node uses the Gitea REST API v1 endpoint /api/v1 to perform the operation.

Troubleshooting

  • Invalid SSH Key Format: If the provided SSH key is not properly armored or formatted, the API will reject it. Ensure the key is a valid public SSH key string.
  • Permission Denied: If the API key used does not have sufficient permissions to add keys to the user, the request will fail. Verify the API token has appropriate scopes.
  • Missing Required Fields: The Key and Title properties are required. Omitting them will cause errors.
  • Read Only Flag Misuse: Setting the Read Only flag incorrectly may lead to unexpected access levels. Confirm the intended permission level before setting this property.

Links and References

Discussion