# Failure when trying to regenerate Deploy Key (checkout-key)

**URL:** <https://discuss.circleci.com/t/failure-when-trying-to-regenerate-deploy-key-checkout-key/46590>\
**Category:** Bug Reports\
**Created:** [January 6, 2023, 11:49am UTC](https://discuss.circleci.com/t/failure-when-trying-to-regenerate-deploy-key-checkout-key/46590 "2023-01-06T11:49:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![benoittgt](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/benoittgt/32/11580_2.png) [@benoittgt](https://discuss.circleci.com/u/benoittgt)\
**Post date:** [January 6, 2023, 11:49am UTC](https://discuss.circleci.com/t/failure-when-trying-to-regenerate-deploy-key-checkout-key/46590/1 "2023-01-06T11:49:04Z")

</div>

Similar to [Checkout SSH-Keys returns a 404](https://discuss.circleci.com/t/checkout-ssh-keys-returns-a-404/2780)

I just revoked my access to CircleCI from Github. Re-enable it when I connected to CircleCI again. But i get an error when I am trying to remove then add again a deploy key.

Post to [https://circleci.com/api/v1.1/project/github/org/project/checkout-key](https://circleci.com/api/v1.1/project/github/org/project/checkout-key)

It returns

```auto
{"message":"{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/reference/repos#create-a-deploy-key\"}"}

```

It also break your JS.

```auto
Uncaught (in promise) Error: {"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/repos#create-a-deploy-key"}

```

---

<div class="post-metadata">

**Author:** ![benoittgt](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/benoittgt/32/11580_2.png) [@benoittgt](https://discuss.circleci.com/u/benoittgt)\
**Post date:** [January 6, 2023, 11:53am UTC](https://discuss.circleci.com/t/failure-when-trying-to-regenerate-deploy-key-checkout-key/46590/2 "2023-01-06T11:53:42Z")

</div>

It might be a side effect of [[CircleCI Security Alert] Rotate any secrets stored in CircleCI - #107 by aaronstillwell](https://discuss.circleci.com/t/circleci-security-alert-rotate-any-secrets-stored-in-circleci/46479/107) ?

---

<div class="post-metadata">

**Author:** ![benoittgt](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/benoittgt/32/11580_2.png) [@benoittgt](https://discuss.circleci.com/u/benoittgt)\
**Post date:** [January 6, 2023, 1:49pm UTC](https://discuss.circleci.com/t/failure-when-trying-to-regenerate-deploy-key-checkout-key/46590/3 "2023-01-06T13:49:04Z")

</div>

It was related to a script on our side to handle deploy key.

---

<div class="post-metadata">

**Author:** ![benoittgt](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/benoittgt/32/11580_2.png) [@benoittgt](https://discuss.circleci.com/u/benoittgt)\
**Post date:** [January 6, 2023, 1:50pm UTC](https://discuss.circleci.com/t/failure-when-trying-to-regenerate-deploy-key-checkout-key/46590/4 "2023-01-06T13:50:12Z")

</div>

But I think the front should better handle this error.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [January 16, 2023, 1:50pm UTC](https://discuss.circleci.com/t/failure-when-trying-to-regenerate-deploy-key-checkout-key/46590/5 "2023-01-16T13:50:48Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
