Skip to content

Get an organization public key

GET
/orgs/{org}/actions/secrets/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.

The authenticated user must have collaborator access to a repository to create, update, or read secrets.

OAuth tokens and personal access tokens (classic) need theadmin:org scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.

API method documentation

org
required
string

The organization name. The name is not case sensitive.

Response

Media type application/json
ActionsPublicKey

The public key used for setting Actions Secrets.

object
key_id
required

The identifier for the key.

string
key
required

The Base64 encoded public key.

string
id
integer
url
string
title
string
created_at
string
Examples
Example default
{
"key_id": "012345678912345678",
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234"
}