Keys and secrets

You committed a secret: revoke, replace, clean up

What you see
A key or password is in a file that was committed, maybe already on GitHub.
Why it happens
The secret wasn't in an ignored file. Once pushed, assume someone has seen it.
How to fix it
  1. Revoke the key on the provider's website first. This matters most.
  2. Create a new key and store it only in Vercel and .env.local.
  3. Ask your agent to remove it from the code, add the file to .gitignore, and explain your options for the history.

Message for your agent

I committed a secret and I've already revoked it. Remove it from the code, make sure the file is ignored, and explain my options for the Git history in plain words before changing anything.

Safety

How to prevent it: Secrets only ever live in .env.local and Vercel.

Still stuck?Report it to your agent, clearly

Hands-on test on Mac and Windows pending · Last reviewed Nov 8, 2026