Skip to main content

user_public_keys

Creates, updates, deletes, gets or lists a user_public_keys resource.

Overview

Nameuser_public_keys
TypeResource
Idgithub.codespaces.user_public_keys

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
key_idstringThe identifier for the key. (example: 1234567)
keystringThe Base64 encoded public key. (example: hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs=)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_public_key_for_authenticated_userselectGets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets.

The authenticated user must have Codespaces access to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the codespace or codespace:secrets 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.

NameDatatypeDescription

SELECT examples

Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets.

The authenticated user must have Codespaces access to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the codespace or codespace:secrets scope to use this endpoint.

SELECT
key_id,
key
FROM github.codespaces.user_public_keys
;