This project requires sensitive credentials that should NEVER be committed to the repository:
sdkconfig- Contains WiFi password, MQTT passwordsdkconfig.old- Backup of sdkconfig.env- Local environment variablesbuild/- May contain artifacts with compiled credentials
idf.py menuconfigConfigure your credentials in "Component config" → "Project Configuration"
cp sdkconfig.defaults sdkconfig.defaults.local
# Edit sdkconfig.defaults.local with your credentials✅ ALWAYS verify before git push:
# 1. Check status
git status
# 2. Make sure these files DO NOT appear:
# - sdkconfig
# - sdkconfig.old
# - .env
# - files in build/
# 3. Verify what will be committed
git diff --cached
# 4. If you find credentials, remove immediately:
git reset HEAD <sensitive_file>If you accidentally committed credentials:
# Undo the last commit keeping the changes
git reset --soft HEAD~1
# Remove file from staging
git reset HEAD sdkconfig
# Make new commit without the sensitive file
git add .
git commit -m "Your commit without credentials"-
Change IMMEDIATELY all exposed credentials:
- WiFi password
- MQTT password
- Any other secrets
-
Clean Git history:
# Use git filter-branch or BFG Repo Cleaner
git filter-branch --force --index-filter \
"git rm --cached --ignore-unmatch sdkconfig" \
--prune-empty --tag-name-filter cat -- --all
# Force push (careful!)
git push origin --force --all- Consider recreating the repository if credentials are critical
- ✅ Use strong and unique passwords
- ✅ Review the diff before each commit
- ✅ Configure Git to ignore sensitive files globally
- ✅ Use git hooks to prevent accidental commits
- ✅ Keep
.gitignoreupdated - ❌ Never commit configuration files with real credentials
- ❌ Never push
sdkconfigorsdkconfig.old
Create a pre-commit hook to automatically verify:
#!/bin/bash
# .git/hooks/pre-commit
if git diff --cached --name-only | grep -E "sdkconfig|\.env"; then
echo "❌ ERROR: Attempt to commit sensitive file detected!"
echo "Blocked files: sdkconfig, .env"
exit 1
fiMake the hook executable:
chmod +x .git/hooks/pre-commitIf you have questions about security or accidentally expose credentials, open an issue (without including the credentials!) or contact the maintainer.