Trying to work on my both my actual "work" repos, and my personal repos on git hub, from my computer.
The work account was set up first, and everything works flawlessly.
My personal account, however cannot seem to push to my personal repo, which is set up under a different account/email.
I've tried copying my work key up to my personal account, but that throws an error, because of course a key can be only attached to one account.
How can I push/pull to and from both accounts, from their respective github credentials?
Open config file & add below codes. (change according to your account)
Account 1
Account 2
Account 3
Add remote url as follows
Account 1
Account 2
Account 3
Beside of creating multiple SSH Keys for multiple accounts you can also consider to add collaborators on each project using the same account emails and store the password permanently.
I have setup multiple accounts with different emails then put the same user and email on each account as one of the collaborators. By this way I can access to all account without adding SSH Key, or switching to another username, and email for the authentication.
Use HTTPS:
change remote url to https:
and you are good to go:
To ensure that the commits appear as performed by USERNAME, one can setup the user.name and user.email for this project, too: