Member-only story

How to push to a work repo and personal repo with separate GitHub accounts

Kevin Kim
2 min readApr 12, 2020

--

Sometimes I just want to work on some side projects on my work laptop for personal learning and still light up my personal GitHub account squares with my personal Github account.

I used a mix of a tutorial and a Stack Overflow answers and this is what worked for me.

Step 1 — Create a New SSH Key

cd ~/.sshssh-keygen -t rsa -C "my-personal-github-email@gmail.com"Generating public/private rsa key pairEnter file in which to save the key (/Users/administrator/.ssh/id_rsa): /Users/administrator/.ssh/id_rsa_personalEnter passphrase (empty for no passphrase)Enter same passphrase again:Your id has been saved in .....

Step 2— Enter SSH Keys into Personal Github Account

Log into personal github account, go to account settings, go to SSH Public Keys, set the title to whatever, and paste in Key from whatever is stored in your .ssh directory

vim id_rsa_personal.pub

copy the whole string from there, then paste it into the SSH Public Key section, click Add Key

Step 3 — Let SSH know about your newly created rsa

ssh-add

--

--

No responses yet