[NOTE: GitHub SSH Keys] @ 40:55
▶ Watch Timestamp
He didn't explain this part fully. Here's what you actually do:
1. Generate a key per GitHub identity:
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_personal -C "you@personal.com"
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_work -C "you@work.com"
2. Create ~/.ssh/config:
Host github-personal
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519_personal
Host github-work
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519_work
3. Update git remotes:
git remote set-url origin git@github-personal:username/repo.git
git remote set-url origin git@github-work:org/repo.git
This isolates each GitHub account using a key alias, so you avoid auth conflicts.