How to Connect and use multiple github account on Single Deveice?
π§ Are you facing challenges like slow website performance, poor user experience, cross-browser issues, and difficulty integrating with back-end systems, all while trying to manage business growth without a streamlined digital solution?
π€ Are you struggling to reach a wider audience, improve customer engagement, and stay competitive without a web app, while dealing with inefficient operations, limited scalability, and missed revenue opportunities?
π Build a web app to expand reach, improve engagement, and streamline operations for growth.
βοΈ Optimize performance, enhance user experience, and integrate systems with a smooth, scalable solution.
π¨βπ» I am Zia-Ur-Rehman a MERN Developer with experience in building scalable and high-performing web applications that solve buisness Problems. I worked with the startup to Help their clients by developing highly scalable webApps to make their global buisness mangable with one click across globe.
β
Frontend Development to create responsive, user-friendly interfaces that solve the problems of your audience.
β
Figma to Next.js Functional App transforming your designs into interactive, high-performance Web apps.
β
Web App Development to expand your reach and improve customer engagement.β
Performance Optimization for faster load times and seamless user experience.β
Cross-Browser Compatibility ensuring your app works perfectly everywhere.β
Backend Integration to streamline operations and boost business efficiency.
If you have an idea that will capture market share, why are you waiting? π DM me today or email me (emailtozia0@gmail.com) and get started!
1οΈβ£ Introduction: Why Multiple GitHub Accounts Exist
Many developers have:
π€ Personal GitHub account
π’ Company GitHub account
π§βπ» Client / Freelance GitHub account
GitHub allows this.
Your computer, however, needs to be taught how to switch between them safely.
That is exactly what this guide does.
2οΈβ£ How GitHub Knows βWho You Areβ
There are two ways GitHub identifies you:
β Password / HTTPS (Not recommended)
Asks for login repeatedly
Breaks with multiple accounts
Easy to misconfigure
β SSH (Recommended & professional)
Uses cryptographic keys
No passwords
Works perfectly with multiple accounts
π We will use SSH only.
3οΈβ£ What Is SSH? (Simple Explanation)
Think of SSH like a house key:
ποΈ Private key β stays on your computer
π§Ύ Public key β given to GitHub
When GitHub sees your key:
βYes, I recognize this person.β
Each GitHub account gets its own key.
4οΈβ£ How Multiple Accounts Work on One Computer
Your computer:
Stores multiple SSH keys
Uses a map (config file) to decide which key to use
Automatically picks the correct identity per project
π You never log in and out manually.
5οΈβ£ Preparing Your System
β Windows
Install Git for Windows
Use PowerShell or Git Bash
SSH is already included
β Ubuntu / Linux
sudo apt update
sudo apt install git openssh-client
Verify:
git --version
ssh -V
6οΈβ£ Creating SSH Keys (Most Important Step)
One account = one key
Never reuse keys.
πΉ Windows & Ubuntu (same command)
ssh-keygen -t ed25519 -C "personal@email.com"
Press Enter to accept default location.
Repeat for second account:
ssh-keygen -t ed25519 -C "work@email.com"
Rename keys when asked:
id_ed25519_personal
id_ed25519_work
7οΈβ£ Adding Keys to GitHub
For each account:
GitHub β Settings β SSH & GPG Keys
Click New SSH Key
Copy the
.pubfile content:cat ~/.ssh/id_ed25519_personal.pubPaste β Save
8οΈβ£ Teaching Your Computer Which Key to Use
Create config file:
~/.ssh/config
Add:
# Personal account
Host github-personal
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519_personal
# Work account
Host github-work
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519_work
π§ This is the secret sauce.
9οΈβ£ Using Repositories (Real Example)
Personal repo:
git clone git@github-personal:username/repo.git
Work repo:
git clone git@github-work:company/repo.git
Git now:
Uses the correct key
Uses the correct GitHub account
Never mixes identities
π Mini Case Study
Scenario:
Zia works at a company and freelances at night.
Company laptop β work GitHub
Same laptop β personal projects
Using SSH config:
β
No login issues
β
No permission errors
β
No accidental pushes to wrong account
β οΈ Common Beginner Mistakes
β Using HTTPS + SSH together
β One SSH key for all accounts
β Wrong key permissions
β Forcing wrong key path
β This guide avoids all of them.
π Best Practices (Professional Level)
One key per account
Clear key names
Backup
.sshfolder securelyNever share private keys
Use SSH config always
π οΈ Quick Troubleshooting Checklist
ssh-add -l
ssh -T git@github.com
git remote -v
If SSH works but Git fails β wrong key mapping.

