I can push just fine to my GitHub repo from my VPS, but once I enter a screen, I get permission denied:
littke@[server]:~/src/[repo]$ git push
Pushing to git@github.com:littke/[repo].git
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Even though I’m able to auth:
littke@[server}:~/src/[repo]$ ssh git@github.com -i ~/.ssh/littke
Enter passphrase for key '/home/littke/.ssh/littke':
PTY allocation request failed on channel 0
Hi littke! You've successfully authenticated, but GitHub does not provide shell access.
Again, this only happens when inside a GNU Screen. I can push fine outside of it. I’ve googled but unable to find anything.
You’re using a different identity file with ssh (the -i option) than git uses. You must tell git which identity to use, through your config. See github’s Troubleshooting SSH issues, section “SSH config”: