If you find that you are unable to access Github after switching out your private keys, you may have a key cached with ssh agent. To diagnose:
ssh git@github.com -v
Look for something along the lines of “debug1: Remote: Forced command: gerve someuser”. If you see this, you have a cached key. To fix:
killall ssh-agent
exec ssh-agent bash
ssh-key -D
ssh-key
You should see “All identifies removed” followed by “Identity added: /
ssh git@github.com