---
title: "Regenerate GPG Key for the Repository."
method: POST
path: "/repos/{owner}/{identifier}/gpg/regenerate/"
tags: ["repos"]
---

# Regenerate GPG Key for the Repository.

`POST /repos/{owner}/{identifier}/gpg/regenerate/`

Regenerate GPG Key for the Repository.

## Response `200`

A GPG key was generated for the Repository.

- RepositoryGpgKey
  - `active` boolean — If selected this is the active key for this repository.
  - `comment` string, required
  - `created_at` string, date-time
  - `default` boolean — If selected this is the default key for this repository.
  - `fingerprint` string — The long identifier used by GPG for this key.
  - `fingerprint_short` string
  - `public_key` string — The public key given to repository users.

## Other responses

- `400` — Request could not be processed (see detail).
- `422` — Missing or invalid parameters (see detail).

---

[API](https://skmtc.dev/cloudsmith/apis/cloudsmith-api-v1.md) · [All operations](https://skmtc.dev/cloudsmith/apis/cloudsmith-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cloudsmith/cloudsmith-api-v1/revisions/4d7879df9b2f/schema)
