A Practical Guide to Managing Multiple Git Accounts with SSH
dev.to·9h·
Discuss: DEV
Flag this post

When you only have one account, using Git is easy—until you add more. Perhaps you organize coursework on Bitbucket, work with your team on GitLab, and contribute to open source on GitHub. All of a sudden, your Git IDs, SSH keys, and credentials begin to clash.

From the straightforward scenario of one account to a complex multi-account configuration, this tutorial takes you step-by-step through the management of SSH keys and Git identities across several accounts.

The Simple Case: One Git Account

If you only use one Git account, life is easy.

Generate an SSH key:

ssh-keygen -t ed25519 -C "you@example.com"

Add the key to your Git provider.

Copy your public key and paste it in your account settings:

cat ~/.ssh/id_ed25519.pub

Test your connecti…

Similar Posts

Loading similar posts...