
How to Use Multiple Git Accounts on One Computer (GitHub, GitLab, Bitbucket)
Learn how to manage multiple Git accounts (GitHub, GitLab, Bitbucket) on a single machine using SSH keys. Step-by-step guide for developers.
Master the art of managing multiple Git accounts across GitHub, GitLab, and Bitbucket on a single machine. This comprehensive guide shows you how to set up SSH keys, configure Git, and switch between accounts effortlessly.
Why Multiple Git Accounts?
Work & Personal
Separate work and personal projects while using the same machine.
Better Security
Use different SSH keys for different accounts, reducing security risks.
Easy Switching
Switch between Git platforms without manual configuration changes.
Quick Setup
One-time setup for hassle-free multi-account management.
Supported Git Platforms
GitHub
Most popular Git
GitLab
Enterprise-focused
Bitbucket
Great for small teams
Quick Setup Guide
1. Generate SSH Key
2. Add to SSH Agent
3. Add to Git Platform
Copy your public key and add it to your Git platform:
GitHub
- Settings → SSH Keys
- Add New Key
- Paste & Save
GitLab
- Settings → SSH Keys
- Add New Key
- Paste & Save
Bitbucket
- Settings → SSH Keys
- Add New Key
- Paste & Save
4. Configure SSH
5. Clone Repository
GitHub
GitLab
Bitbucket
Quick Tips
Security Best Practices
- Use different SSH keys for each account
- Keep private keys secure
- Use strong passphrases
- Rotate keys periodically
Verify Identity: Check which account you're using with:ssh -T git@github-johndoe
ssh -T git@gitlab-johndoe
ssh -T git@bitbucket-johndoe
Summary
This setup lets you manage multiple Git accounts across GitHub, GitLab, and Bitbucket efficiently. Each account gets its own SSH key and configuration, making it easy to switch between work and personal projects while maintaining security. Whether you're a freelancer, contractor, or working on multiple projects, this approach provides a clean and maintainable solution for managing multiple Git identities.
Keep Exploring Git and More
Interested in more tips and guides? Browse our other blog posts to keep learning and stay inspired!
Have questions or want to work together? Contact me through my portfolio.