Skip to main content

Get a repository 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. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint.

GET/repos/{owner}/{repo}/actions/secrets/public-key
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
owner string
required
repo string
required

Responses

application/json ActionsPublicKey object

Response

created_at string
optional

Example: 2011-01-26T19:01:12Z

id integer
optional

Example: 2

key string
required

The Base64 encoded public key.

Example: hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs=

key_id string
required

The identifier for the key.

Example: 1234567

title string
optional

Example: ssh-rsa AAAAB3NzaC1yc2EAAA

url string
optional

Example: https://api.github.com/user/keys/2