# Deployment is broken after rotating secrets

**URL:** <https://discuss.circleci.com/t/deployment-is-broken-after-rotating-secrets/46668>\
**Category:** Deployments\
**Tags:** rails, circle-yml\
**Created:** [January 11, 2023, 1:14pm UTC](https://discuss.circleci.com/t/deployment-is-broken-after-rotating-secrets/46668 "2023-01-11T13:14:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HeronQ](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/heronq/32/32047_2.png) [@HeronQ](https://discuss.circleci.com/u/HeronQ)\
**Post date:** [January 11, 2023, 1:14pm UTC](https://discuss.circleci.com/t/deployment-is-broken-after-rotating-secrets/46668/1 "2023-01-11T13:14:56Z")

</div>

Since the security alert has been released,

We have been experiencing problem deploying our app since the 6th of January!

I have rotated the secrets and upon triggering deployment we get this error:

```auto
master queueable
This build will block until all previous builds complete.
Max Queue Time: 180 minutes.
Only blocking execution if running previous jobs on branch: master
Attempting to access CircleCI api. If the build process fails after this step, ensure your CIRCLECI_API_KEY is set.
API access successful
Checking time of workflow: 91aa2db4-90f9-40f0-a3ae-7f355b2307dd

Exited with code exit status 22

```

What needs to be done to mitigate the matter ?

 ![Screenshot 2023-01-12 at 10.19.23](https://global.discourse-cdn.com/circleci/original/3X/9/0/9028ce3b557d0f72694b001d2f19f37987266c82.png)

---

<div class="post-metadata">

**Author:** ![HeronQ](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/heronq/32/32047_2.png) [@HeronQ](https://discuss.circleci.com/u/HeronQ)\
**Post date:** [January 12, 2023, 9:39am UTC](https://discuss.circleci.com/t/deployment-is-broken-after-rotating-secrets/46668/2 "2023-01-12T09:39:37Z")

</div>

There was a problem with the circle api key rotation

---

<div class="post-metadata">

**Author:** ![yannCI](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/yannci/32/24866_2.png) [@yannCI](https://discuss.circleci.com/u/yannCI)\
**Post date:** [January 12, 2023, 10:48am UTC](https://discuss.circleci.com/t/deployment-is-broken-after-rotating-secrets/46668/3 "2023-01-12T10:48:41Z")

</div>

Hi @HeronQ,

The error message:

`Attempting to access CircleCI api. If the build process fails after this step, ensure your CIRCLECI_API_KEY is set.`

indeed suggested that the CircleCI API token you’re using is no longer valid.

This is a consequence of our decision to remove all Personal and Project API Tokens created **before 00:00 UTC on January 5, 2023**. (See the “[Security update 01/06/2023 - 17:52 UTC](https://circleci.com/blog/january-4-2023-security-alert/)”).

---

<div class="post-metadata">

**Author:** ![HeronQ](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/heronq/32/32047_2.png) [@HeronQ](https://discuss.circleci.com/u/HeronQ)\
**Post date:** [January 12, 2023, 12:20pm UTC](https://discuss.circleci.com/t/deployment-is-broken-after-rotating-secrets/46668/4 "2023-01-12T12:20:37Z")

</div>

Tanks YannCI, It’s solved, somehow there was a problem with updating the circleci token 😉
