Skip to content

Instantly share code, notes, and snippets.

View harshith-21's full-sized avatar
🎯
Focusing

HARSHITH GANDHE harshith-21

🎯
Focusing
View GitHub Profile
@harshith-21
harshith-21 / guide.md
Created July 30, 2025 19:31
Manage Multiple GitHub Accounts via SSH

2 Git Accounts, 1 CLI

So, if you're like me and use the same machine for both work and personal projects, you've probably run into the challenge of managing multiple GitHub accounts. Switching between two Git accounts - one for work and one for personal use - can be tricky, especially when you need to ensure the right credentials are used for each repository. In this guide, I'll walk you through how to set up your machine to easily switch between Git accounts without the hassle.

1. Generate RSA Key Pairs for Each Account

You might have a SSH key and added it to remote git account (GitHub, Bitbucket etc) already for work. If so, you can skip this step for work account and only do for personal.

You can create more, if you want to configure more accounts