Managing Multiple GitHub Accounts in VS Code (Windows Guide)

Nov 28, 2025| Tags: git, github, ssh, vscode, windows, developer-tools, ed25519, guide

πŸ› οΈ Managing Multiple GitHub Accounts in VS Code (Windows Guide)

It’s common for developers to juggle work, personal, and client projects, each requiring a different Git identity. Instead of manually signing in and out, this guide shows you how to use SSH Keys and the ~/.ssh/config file to handle multiple GitHub accounts seamlessly on Windows, especially when using Git Bash and VS Code.


Prerequisites


πŸ”‘ Why We Choose ED25519 Keys

While you may see guides recommending RSA keys, we choose ED25519 because it is the current standard for SSH key security and performance.

Feature ED25519 (Recommended) RSA (Older Standard)
Security Equivalent to 3072-bit RSA Secure at 4096-bit, but slower
Key Size Very small (256-bit) Large (often 4096-bit)
Performance Faster for key generation and verification Slower, requiring more computational overhead
Security Bonus Resistant to timing attacks More susceptible if not implemented carefully

By choosing ED25519, we get smaller key files, faster performance, and modern cryptographic guarantees.


Step 0: Git Global Setup & VS Code PATH

Before generating keys, perform these two tasks in Git Bash:

  1. Set Your Global Git Identity:
    bash git config –global user.name “Your Default Full Name” git config –global user.email “your_default_email@example.com

  2. Enable the code Command (VS Code Shortcut):

    • Open VS Code
    • Press Ctrl+Shift+P
    • Type shell command
    • Select “Shell Command: Install ‘code’ command in PATH”
    • Restart Git Bash if needed

Step 1: Generate Unique SSH Keys πŸ”‘

We create a separate ED25519 key pair for each account.

Account Email Key File Name Alias
Work A work-a@provolve-ai.com id_ed25519_provolve-ai github.com-provolve-ai
Work B work-b@otheraccount.com id_ed25519_otheraccount github.com-otheraccount

Commands:

ssh-keygen -t ed25519 -C "work-a@provolve-ai.com" -f ~/.ssh/id_ed25519_provolve-ai
ssh-keygen -t ed25519 -C "work-b@otheraccount.com" -f ~/.ssh/id_ed25519_otheraccount

πŸ›‘ Gotcha: Custom Key Naming

Using descriptive names prevents confusion when managing many keys.


Step 2: Start the SSH Agent and Add Keys πŸ’Ύ

Start the agent:

eval "$(ssh-agent -s)"

Add your keys:

ssh-add ~/.ssh/id_ed25519_provolve-ai
ssh-add ~/.ssh/id_ed25519_otheraccount

Step 3: Configure the SSH Config File βš™οΈ

Open:

code ~/.ssh/config
### OR
nano ~/.ssh/config

Add:

Provolve-AI Account

Host github.com-provolve-ai HostName github.com User git IdentityFile ~/.ssh/id_ed25519_provolve-ai

Other Account

Host github.com-otheraccount HostName github.com User git IdentityFile ~/.ssh/id_ed25519_otheraccount


Step 4: Upload Public Keys to GitHub ⬆️

Copy key:

cat ~/.ssh/id_ed25519_provolve-ai.pub | clip

Add it at:
GitHub β†’ Settings β†’ SSH and GPG keys β†’ New SSH key
Select Authentication Key.

Repeat for Other Account.

🚨 Gotcha: Private Key Error

If GitHub rejects the key, you’re likely pasting the private key instead of .pub.


Step 5: Test the Connections βœ…

ssh -T git@github.com-provolve-ai
ssh -T git@github.com-otheraccount

Expected response:
“You’ve successfully authenticated…"

πŸ’‘ The username is always git; the alias determines which key is used.


Step 6: Clone and Configure a Repository πŸ“‚

A. Clone Using Alias

git clone git@github.com-provolve-ai:Provolve-AI/provolve-ai.git /c/dev/provolve-ai

B. Set Local Git Identity

cd /c/dev/provolve-ai
git config user.name "Your Provolve-AI Full Name"
git config user.email "work-a@provolve-ai.com"

These settings apply ONLY to this repo.


πŸš€ VS Code Sync

VS Code automatically respects your SSH configuration and repo-specific Git identity.
You can now securely clone, commit, and push using the correct GitHub account.


SO WHAT YOU THINK ?

Let's Unlock the potential of your business with AI-supported automation.

Contact with me