When using ssh url (like git@github.com:fakename/testapp.git
), the most likely explanation is that you didn't defined a new ssh key, and used the appropriate ~/.ssh/config
file in order to declare to Git what ssh key to use.
Your ssh url would become:
mysecondrepo:fakename/testapp.git
With an ssh config file like:
Host mysecondrepo
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_mysecondrepo
See "How to work on personal GitHub repo from office computer whose SSH key is already added to a work related GitHub account?" for more on multiple ssh key management.
Of course, switching to https url (as commented by the OP) works:
https://fakename@github.com/fakename/testapp.git
It forces you to identify with your account.
But it doesn't solve the ssh configuration issue.