This repository now treats credentials and host-local state as non-versioned.
These files are intentionally ignored by Git and should stay local-only:
config/gh/hosts.ymlconfig/msmtp/configssh/id_*ssh/*.pubssh/known_hostsssh/known_hosts.old
Because credentials were previously tracked, rotate them before any push.
- Revoke old token in GitHub settings:
https://github.com/settings/tokens
- Re-authenticate CLI:
gh auth logout -h github.comgh auth login -h github.com --git-protocol ssh --webgh auth status
If your private key lived under this repo path, rotate it:
ssh-keygen -t ed25519 -C "domogami@gmail.com" -f ~/.ssh/id_ed25519_github
ssh-add ~/.ssh/id_ed25519_github
cat ~/.ssh/id_ed25519_github.pubAdd the public key at https://github.com/settings/keys and remove old keys.
Use:
./scripts/migrate_ssh_out_of_repo.zshThis script:
- Creates a real
~/.sshdirectory from your current symlinked contents - Preserves a timestamped backup
- Re-links only
~/.ssh/configtossh/configin this repo
Run before each push:
git status --short
git diff --cached --name-only | rg -i "(hosts\\.yml|id_ed25519|id_rsa|token|secret|password|credentials|\\.pem$|\\.key$)" || trueThis repo ships a pre-commit hook at .githooks/pre-commit.
- Install scanner:
brew install gitleaks
- Ensure hooks are enabled:
./install(automatically setscore.hooksPath=.githooks)- or manually:
git config core.hooksPath .githooks
- Commit normally; staged changes are scanned for secrets before commit completes.