Get a repository public key
GET
/repos/{owner}/{repo}/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.
Anyone with read access to the repository can use this endpoint.
If the repository is private, OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” owner
required
string
The account owner of the repository. The name is not case sensitive.
repo
required
string
The name of the repository without the .git extension. The name is not case sensitive.
Responses
Section titled “ Responses ”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"}