public_keys
Creates, updates, deletes, gets or lists a public_keys resource.
Overview
| Name | public_keys |
| Type | Resource |
| Id | github.dependabot.public_keys |
Fields
The following fields are returned by SELECT queries:
- get_repo_public_key
- get_org_public_key
Response
| Name | Datatype | Description |
|---|---|---|
key_id | string | The identifier for the key. (example: 1234567) |
key | string | The Base64 encoded public key. (example: hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs=) |
Response
| Name | Datatype | Description |
|---|---|---|
key_id | string | The identifier for the key. (example: 1234567) |
key | string | The Base64 encoded public key. (example: hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs=) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_repo_public_key | select | owner, repo | 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. | |
get_org_public_key | select | org | Gets 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.
| Name | Datatype | Description |
|---|---|---|
org | string | The organization name. The name is not case sensitive. |
owner | string | The account owner of the repository. The name is not case sensitive. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
SELECT examples
- get_repo_public_key
- get_org_public_key
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
;
Gets 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.
SELECT
key_id,
key
FROM github.dependabot.public_keys
WHERE org = '{{ org }}' -- required
;