Watch: I pushed an API key to GitHub: lock it down fast | Vovy
Watch Vovy do it on a Mac: "I accidentally committed my .env with my Stripe key to GitHub, fix it". Vovy rotates the leaked key first, then scrubs it from your Git history, blocks .env files, and turns on push protection so it cannot happen again.
"I accidentally committed my .env with my Stripe key to GitHub, fix it"
Vovy rotates the leaked key first, then scrubs it from your Git history, blocks .env files, and turns on push protection so it cannot happen again.
What happens in the video
- Find every leaked secret: Vovy scans the repo history and GitHub's secret scanning alerts to list every key exposed and which commit it landed in.
- Rotate the keys first: Vovy opens each provider's dashboard, like Stripe's API keys page, and rolls the key. Deleting the file does not help; bots scrape GitHub for keys within minutes.
- Update the new keys: Vovy puts the new keys in your local .env and your host's environment variables, then redeploys so nothing breaks.
- Scrub the history: Vovy uses git filter-repo to remove the file from every commit and force-pushes. This rewrites history, so it asks first.
- Prevent a repeat: Vovy adds .env to .gitignore, turns on push protection in Settings, and shows a card of every key rotated.
Read the step-by-step guideLoading...