Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows you to add a new SSH key to a specific repository in Gitea. It is useful for automating the management of repository access by programmatically adding deploy keys or user keys with controlled permissions. For example, you can use this node to add a read-only SSH key that allows continuous integration servers to clone a repository without exposing write access.

Properties

Name Meaning
Owner The owner (user or organization) of the repository where the key will be added.
Repo The name of the repository to which the SSH key will be added.
Key The armored SSH public key string that you want to add to the repository.
Read Only Boolean flag indicating if the key should have read-only access (true) or read/write (false).
Title A descriptive title for the SSH key being added, used for identification purposes.

Output

The node outputs JSON data representing the newly created deploy key resource as returned by the Gitea API. This typically includes details such as the key's ID, title, key string, read-only status, and timestamps. There is no binary output.

Dependencies

  • Requires an active connection to a Gitea instance via its REST API.
  • Needs an API authentication token configured in the node credentials to authorize requests.
  • The base URL for the Gitea API must be set correctly in the credentials.

Troubleshooting

  • Invalid Credentials or Unauthorized: If the API token is missing or invalid, the node will fail with authorization errors. Ensure the API token has sufficient permissions to manage repository keys.
  • Repository Not Found: Providing incorrect owner or repository names will result in not found errors. Double-check spelling and case sensitivity.
  • Malformed SSH Key: The Key property must be a valid armored SSH public key. Invalid formats will cause the API to reject the request.
  • Permission Issues: If the API token does not have rights to modify deploy keys on the repository, the operation will fail.
  • Network Issues: Connectivity problems to the Gitea server will cause timeouts or connection errors.

Links and References

Discussion