ssh_signing_keys
Creates, updates, deletes, gets or lists a ssh_signing_keys resource.
Overview
| Name | ssh_signing_keys |
| Type | Resource |
| Id | github.users.ssh_signing_keys |
Fields
The following fields are returned by SELECT queries:
- get_ssh_signing_key_for_authenticated_user
- list_ssh_signing_keys_for_user
- list_ssh_signing_keys_for_authenticated_user
Response
| Name | Datatype | Description |
|---|---|---|
id | integer | |
created_at | string (date-time) | |
key | string | |
title | string |
Response
| Name | Datatype | Description |
|---|---|---|
id | integer | |
created_at | string (date-time) | |
key | string | |
title | string |
Response
| Name | Datatype | Description |
|---|---|---|
id | integer | |
created_at | string (date-time) | |
key | string | |
title | string |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_ssh_signing_key_for_authenticated_user | select | ssh_signing_key_id | Gets extended details for an SSH signing key. OAuth app tokens and personal access tokens (classic) need the read:ssh_signing_key scope to use this endpoint. | |
list_ssh_signing_keys_for_user | select | username | per_page, page | Lists the SSH signing keys for a user. This operation is accessible by anyone. |
list_ssh_signing_keys_for_authenticated_user | select | per_page, page | Lists the SSH signing keys for the authenticated user's GitHub account. OAuth app tokens and personal access tokens (classic) need the read:ssh_signing_key scope to use this endpoint. | |
create_ssh_signing_key_for_authenticated_user | insert | key | Creates an SSH signing key for the authenticated user's GitHub account. OAuth app tokens and personal access tokens (classic) need the write:ssh_signing_key scope to use this endpoint. | |
delete_ssh_signing_key_for_authenticated_user | delete | ssh_signing_key_id | Deletes an SSH signing key from the authenticated user's GitHub account. OAuth app tokens and personal access tokens (classic) need the admin:ssh_signing_key scope to use this endpoint. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
ssh_signing_key_id | integer | The unique identifier of the SSH signing key. |
username | string | The handle for the GitHub user account. |
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- get_ssh_signing_key_for_authenticated_user
- list_ssh_signing_keys_for_user
- list_ssh_signing_keys_for_authenticated_user
Gets extended details for an SSH signing key.
OAuth app tokens and personal access tokens (classic) need the read:ssh_signing_key scope to use this endpoint.
SELECT
id,
created_at,
key,
title
FROM github.users.ssh_signing_keys
WHERE ssh_signing_key_id = '{{ ssh_signing_key_id }}' -- required
;
Lists the SSH signing keys for a user. This operation is accessible by anyone.
SELECT
id,
created_at,
key,
title
FROM github.users.ssh_signing_keys
WHERE username = '{{ username }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
Lists the SSH signing keys for the authenticated user's GitHub account.
OAuth app tokens and personal access tokens (classic) need the read:ssh_signing_key scope to use this endpoint.
SELECT
id,
created_at,
key,
title
FROM github.users.ssh_signing_keys
WHERE per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
INSERT examples
- create_ssh_signing_key_for_authenticated_user
- Manifest
Creates an SSH signing key for the authenticated user's GitHub account.
OAuth app tokens and personal access tokens (classic) need the write:ssh_signing_key scope to use this endpoint.
INSERT INTO github.users.ssh_signing_keys (
title,
key
)
SELECT
'{{ title }}',
'{{ key }}' /* required */
RETURNING
id,
created_at,
key,
title
;
# Description fields are for documentation purposes
- name: ssh_signing_keys
props:
- name: title
value: "{{ title }}"
description: |
A descriptive name for the new key.
- name: key
value: "{{ key }}"
description: |
The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)."
DELETE examples
- delete_ssh_signing_key_for_authenticated_user
Deletes an SSH signing key from the authenticated user's GitHub account.
OAuth app tokens and personal access tokens (classic) need the admin:ssh_signing_key scope to use this endpoint.
DELETE FROM github.users.ssh_signing_keys
WHERE ssh_signing_key_id = '{{ ssh_signing_key_id }}' --required
;