Get a repository public key
GET
/repos/{owner}/{repo}/dependabot/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.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint if the repository is private.
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
DependabotPublicKey
The public key used for setting Dependabot Secrets.
object
key_id
required
The identifier for the key.
string
key
required
The Base64 encoded public key.
string
Examples
Example default
{ "key_id": "012345678912345678", "key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234"}