Skip to content

Instantly share code, notes, and snippets.

@hardikhari96
Last active August 30, 2022 19:48
Show Gist options
  • Save hardikhari96/03aee32fa1c517095528023c2aa15049 to your computer and use it in GitHub Desktop.
Save hardikhari96/03aee32fa1c517095528023c2aa15049 to your computer and use it in GitHub Desktop.

Edit file

~/.ssh/config 
Host hari.github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa

Host private.github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/private

and update git repository remote url hostname to

for hari.github.com

git@github.com:hardikhari96/service-worker-with-nodejs.git

to

git@hari.github.com:hardikhari96/service-worker-with-nodejs.git

and

for private.github.com

git@github.com:hardikhari96/service-worker-with-nodejs.git

to

git@private.github.com:hardikhari96/service-worker-with-nodejs.git

Manage Different account in single gitRemote host service with multiple private key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment