How to work on personal GitHub repo from office computer whose SSH key is already added to a work related GitHub account?

You can add as many public:private key you want, the idea being to register them in %HOME%/.ssh/config file, in order for you to define remote with ssh addresses like:

workgh:Work
persgh:Personal

See “change github account mac command line” as an example of an ssh/config file.

In your case:

#Personal GitHub
Host persgh
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa_perso

#Personal Work
Host workgh
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa_work

Reusing the same ssh key in different environment is genrally frowned upon.
See this SO question to generate multiple ssh keys non-interactively.

Leave a Comment