Skip to content

Instantly share code, notes, and snippets.

View IbroRebronja's full-sized avatar
🐢

Ibro Rebronja IbroRebronja

🐢
  • no company as of yet
  • Doboj, Bosnia & Herzegovina
  • 14:03 (UTC +01:00)
  • LinkedIn in/ibro-rebronja
View GitHub Profile
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active November 21, 2024 10:44
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.