The following files contain API keys, secrets, and credentials:
.env
.env.prod
scripts/proxy-client/.env
atlantic-dashboard/.env.local
- Check git status:
git status --ignored- Verify .env files are ignored:
git check-ignore .env .env.prod scripts/proxy-client/.env- Remove from git history if committed:
git rm --cached .env .env.prod scripts/proxy-client/.env
git commit -m "Remove sensitive environment files"- β
Use
.env.exampletemplates (committed) - β
Use
.env.localfor actual secrets (gitignored) - β Never commit actual API keys
- β Rotate keys if accidentally committed
- β
Use environment-specific files (
.env.development,.env.production)
-
Immediately rotate all keys:
- Paystack API keys
- Oxylabs credentials
- JWT secrets
- Database passwords
-
Remove from git history:
git filter-branch --force --index-filter \
"git rm --cached --ignore-unmatch .env .env.prod" \
--prune-empty --tag-name-filter cat -- --all- Force push (if safe):
git push origin --force --allBackend (scripts/proxy-client/.env):
- PAYSTACK_SECRET_KEY
- PAYSTACK_PUBLIC_KEY
- JWT_SECRET
- OXYLABS_USERNAME (if using Oxylabs)
- OXYLABS_PASSWORD
Dashboard (atlantic-dashboard/.env.local):
- NEXT_PUBLIC_API_URL
- NEXT_PUBLIC_PAYSTACK_PUBLIC_KEY
Last Updated: January 2026