1

Banging my head on this github multiple user thing and hoping I can get some help!

I just added a new email to my existing github account, changed my git configs locally to the right name and email, and added the ssh key to github but when I try to push my new project I created it says permission denied. I have the right repo set up for my origin too.

What's confusing me is when I do ssh -T git@github.com it says you've successfully authenticated with my other user...

I know I'm missing something so if you see it please let me know!

Thanks

user3029619
  • 109
  • 1
  • 10
  • Found My Problem Here: http://stackoverflow.com/questions/7548158/having-trouble-switching-github-accounts-on-terminal Was using old stored ssh key – user3029619 Nov 25 '13 at 02:12

1 Answers1

0

A full ssh url will work:

ssh://git@github.com/User/repo.git

But here, you might be using an scp-like syntax, like the question you mention:

github.com:User/repo.git

You risk using an entry "github.com" entry in a $HOME/.ssh/config file, which can then specify explicitly a different private key, as shown here.

Host github.com
   Hostname github.com
   User git
   IdentityFile ~/.ssh/myprivatekey
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250