Skip to main content

public_keys

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

Overview

Namepublic_keys
TypeResource
Idgithub.dependabot.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_repo_public_keyselectowner, repoGets your public key, which you need to encrypt secrets. You need to
encrypt a secret before you can create or update secrets. Anyone with read access
to the repository can use this endpoint.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint if the repository is private.
get_org_public_keyselectorgGets your public key, which you need to encrypt secrets. You need to
encrypt a secret before you can create or update secrets.

OAuth app tokens and personal access tokens (classic) need the admin:org 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
orgstringThe organization name. The name is not case sensitive.
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.

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. Anyone with read access
to the repository can use this endpoint.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint if the repository is private.

SELECT
key_id,
key
FROM github.dependabot.public_keys
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
;