Sample - GitHub REST API
GET/orgs/{org}/private-registries/public-key

Get private registries public key for an organization

Gets the org public key, which is needed to encrypt private registry secrets. You need to encrypt a secret before you can create or update secrets.

OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter
orgstringrequired
The organization name. The name is not case sensitive.

2 status codes
200Response
key_idstringrequired
The identifier for the key.
keystringrequired
The Base64 encoded public key.
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 404 is returned: Resource not found.