Delete a public key

Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least admin:public_key scope.

If your GitHub Enterprise Server appliance has LDAP Sync enabled and the option to synchronize SSH keys enabled, this API is disabled and will return a 403 response. Users managed in LDAP won't be able to remove an SSH key address via the API with these options enabled.

DELETE /user/keys/:key_id

Response

Status: 204 No Content