GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation deletes a specific SSH key associated with the authenticated user in GitLab. It is useful for managing user SSH keys by removing keys that are no longer needed or compromised. For example, a user can automate the removal of an old SSH key from their GitLab account to maintain security.

Use Case Examples

  1. Delete an SSH key by specifying its key ID to revoke access associated with that key.
  2. Automate cleanup of user SSH keys in GitLab accounts.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, defaulting to GitLab API key.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET but can be set to DELETE for this operation.
Path Parameters The path parameters for the request, specifically the key_id of the SSH key to delete.

Output

JSON

  • success - Indicates whether the SSH key deletion was successful.
  • statusCode - HTTP status code returned from the GitLab API after the delete operation.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the key_id path parameter is provided and is a valid integer representing the SSH key ID.
  • Authentication errors may occur if the GitLab API key credential is missing or invalid; verify the credential setup.
  • HTTP 404 errors indicate the specified SSH key ID does not exist or is not associated with the authenticated user.
  • HTTP 403 errors indicate insufficient permissions to delete the SSH key; ensure the API key has the necessary scopes.

Links

Discussion