Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>GitHub SSH Profile SwitcherNew to Visual Studio Code? Get it now.
GitHub SSH Profile Switcher

GitHub SSH Profile Switcher

TigerDev Studio

|
8 installs
| (1) | Free
Switch Git user identity, SSH key, GPG signing, and Git provider host aliases per VS Code workspace.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

GitHub SSH Profile Switcher

Use the right Git provider account in every VS Code workspace.

GitHub SSH Profile Switcher helps you switch between personal, work, client, and organization Git identities across GitHub, Bitbucket, GitLab, and custom Git hosts without manually editing Git config or SSH commands for every repository.

It also helps you clone private Git repositories with the correct SSH profile before the repository exists on disk.

Who This Is For

Use this extension if you:

  • use multiple Git provider accounts on the same machine
  • have separate SSH keys for work, personal, or client repositories
  • push to different GitHub organizations, Bitbucket workspaces, or GitLab groups from VS Code
  • need different Git user.name and user.email per repository
  • want one place to manage SSH keys, Git remotes, and identity switching

What The Extension Does

The extension can manage:

  • Git username
  • Git email
  • SSH private key
  • Git provider
  • SSH host alias
  • real SSH host name
  • GPG signing key
  • commit signing setting
  • initialized submodules
  • Git remote URLs
  • Git clone from an empty VS Code window

Profiles are created once and can be selected from any repository.

Install

From Marketplace

  1. Open VS Code.
  2. Open Extensions.
  3. Search for GitHub SSH Profile Switcher.
  4. Install the extension from TigerDev1991.
  5. Open a Git repository.
  6. Run SSH Profiles: Open Manager.

You can also open the manager in a new empty VS Code window to create global profiles or generate SSH keys before cloning any repository.

From VSIX

If you received a .vsix file:

  1. Open VS Code.
  2. Open Extensions.
  3. Select ... in the Extensions view.
  4. Choose Install from VSIX....
  5. Select the .vsix file.
  6. Reload VS Code when prompted.

Quick Start

Use An Existing Repository

  1. Click Setup Identity in the VS Code status bar, or run:

    SSH Profiles: Open Manager
    
  2. Click Create Profile.

  3. Enter your Git name, email, SSH key path, and host alias.

  4. Click Save Changes or Create Profile.

  5. Click Apply on the profile card.

  6. If your remote is HTTPS, click HTTPS -> SSH in the Git Remotes block.

  7. Push normally.

Set Up Before Cloning

You do not need an open repository to create profiles or keys.

  1. Open a new empty VS Code window.

  2. Click Identity in the status bar, or run:

    SSH Profiles: Open Manager
    
  3. Click Create Profile to save an existing SSH key as a reusable profile.

  4. Click Generate SSH Key if you need a new SSH key and profile.

  5. Add the generated public key to your Git provider.

  6. Use SSH Profiles: Git Clone when you are ready to clone.

In an empty window, profiles are saved globally and OpenSSH config is updated. Open a Git repository later to apply a profile to that repository.

Clone A Repository

Use this flow when a private repository fails with Repository not found because Git is using the wrong SSH key for that provider account.

  1. Open a new empty VS Code window.

  2. Click Git Clone in the status bar, or run:

    SSH Profiles: Git Clone
    
  3. Paste a Git HTTPS or SSH URL.

    https://github.com/owner/repository.git
    
    https://bitbucket.org/workspace/repository.git
    

    or:

    git@github.com:owner/repository.git
    
  4. Select the saved SSH profile for that provider account.

  5. Choose the parent folder where the repository should be cloned.

  6. The extension clones using the selected profile's SSH host alias.

  7. Open the cloned repository when prompted.

Example:

git@github.com:owner/repository.git

with profile host github.com-work becomes:

git@github.com-work:owner/repository.git

The clone flow does not create a new profile. It uses an existing saved profile, then writes the selected Git identity and SSH command into the cloned repository's local Git config.

Profile Examples

Typical profile names:

  • Personal
  • Work
  • Client
  • Company GitHub
  • Open Source

Example Personal profile:

Name: Personal
Provider: GitHub
Host name: github.com
Git user.name: Alex Personal
Git user.email: alex.personal@example.com
SSH Key: ~/.ssh/id_ed25519
SSH Host: github.com-personal

Example Work profile:

Name: Work
Provider: GitHub
Host name: github.com
Git user.name: Alex Developer
Git user.email: alex.developer@company.example
SSH Key: ~/.ssh/id_ed25519_github_work
SSH Host: github.com-work

Example Bitbucket profile:

Name: Client Bitbucket
Provider: Bitbucket
Host name: bitbucket.org
Git user.name: Alex Developer
Git user.email: alex@client.example
SSH Key: ~/.ssh/id_ed25519_bitbucket_client
SSH Host: bitbucket.org-client

SSH Config

For host aliases to work, the extension writes matching entries to ~/.ssh/config automatically when you generate a key or when you create, save, or apply a profile.

Example:

# GitHub SSH Profile Switcher: begin github.com-personal
Host github.com-personal
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_ed25519
  IdentitiesOnly yes
# GitHub SSH Profile Switcher: end github.com-personal

# GitHub SSH Profile Switcher: begin github.com-work
Host github.com-work
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_ed25519_github_work
  IdentitiesOnly yes
# GitHub SSH Profile Switcher: end github.com-work

# GitHub SSH Profile Switcher: begin bitbucket.org-client
Host bitbucket.org-client
  HostName bitbucket.org
  User git
  IdentityFile ~/.ssh/id_ed25519_bitbucket_client
  IdentitiesOnly yes
# GitHub SSH Profile Switcher: end bitbucket.org-client

The profile SSH Host value should match the Host value. The profile Host name value is the real provider host written to HostName, such as github.com, bitbucket.org, gitlab.com, or your custom Git host.

If ~/.ssh/config already contains a manual Host entry with the same alias, the extension leaves that entry unchanged and shows a warning instead of overwriting your custom SSH config.

Manager Screen

The manager shows:

  • saved Git identity profiles
  • current workspace status
  • Git remotes
  • detected SSH keys
  • active profile
  • recommended profile
  • current Git user
  • current core.sshCommand

Each profile can store a provider name, SSH host alias, real host name, and SSH user. Built-in presets cover GitHub, Bitbucket, and GitLab, and custom hosts can be typed directly.

The manager also works without an open workspace. In that mode you can create profiles, generate SSH keys, test SSH login, and open SSH config. Applying a profile and rewriting remotes require an open Git repository.

Use the profile card buttons:

  • Apply: use this profile in the current workspace
  • Edit: update the profile
  • Test: test SSH login for the profile provider
  • Delete: remove the profile from the manager

Global Profiles

Profiles are global. You do not need to create the same profile in every repository.

Create the profile once, then:

  1. Open another repository.
  2. Open the manager.
  3. Select or apply the related profile.

The active profile is still workspace-specific, so each repository can use a different identity.

If you clone the same repository into a different folder, use the same saved profile again. That applies the identity to the new local folder; it does not require a new profile.

Safe Storage

Profiles created in the manager are stored in VS Code private extension storage. They are not written to .vscode/settings.json.

This helps prevent personal identity data from being committed to Git.

If you used an older version that wrote profiles into .vscode/settings.json, the extension imports those profiles into the global list when you open that workspace.

HTTPS To SSH

If push fails with an error like:

HTTP 403

your remote is probably still HTTPS.

In the manager:

  1. Find the Git Remotes block.
  2. Look for an HTTPS badge.
  3. Click HTTPS -> SSH.

Example conversion:

https://github.com/company-org/app.git

becomes:

git@github.com-work:company-org/app.git

For Bitbucket:

https://bitbucket.org/workspace/app.git

becomes:

git@bitbucket.org-client:workspace/app.git

SSH Keys

The SSH Keys block detects private keys in ~/.ssh.

You can:

  • generate a new SSH key
  • open SSH config
  • see which profiles use a key
  • delete a detected key

Deleting a key requires confirmation. The extension deletes the private key and the matching .pub file if it exists.

Generate SSH Key

Use Generate Key when you need a new SSH key for a Git provider account.

The extension can:

  • create an ed25519 or rsa key
  • create the .pub file
  • write the matching OpenSSH Host entry
  • show the public key
  • copy the public key
  • create a profile from the new key

After generating a key, add the public key to your provider account:

GitHub -> Settings -> SSH and GPG keys -> New SSH key
Bitbucket -> Personal settings -> SSH keys -> Add key
GitLab -> Preferences -> SSH Keys -> Add new key

Submodules

Enable Apply identity to initialized submodules when a repository contains Git submodules.

When enabled, applying a profile also writes the same identity and SSH command to initialized submodules.

GPG Signing

If your account uses signed commits, add:

  • GPG signing key
  • GPG format
  • Sign commits toggle

When the profile is applied, the extension writes the signing settings to the local Git repository.

Commands

Open the Command Palette and run:

  • SSH Profiles: Open Manager
  • SSH Profiles: Git Clone
  • SSH Profiles: Create Profile
  • SSH Profiles: Edit Profile
  • SSH Profiles: Delete Profile
  • SSH Profiles: Generate SSH Key
  • SSH Profiles: Select Profile
  • SSH Profiles: Switch to Next Profile
  • SSH Profiles: Apply Profile to Workspace
  • SSH Profiles: Test SSH Login
  • SSH Profiles: Rewrite Remote to Profile Host
  • SSH Profiles: Open SSH Config
  • SSH Profiles: Show Current Git Identity

Troubleshooting

Clone returns Repository not found

This usually means the provider received a valid SSH connection from the wrong account.

Use SSH Profiles: Git Clone, paste the repository URL, and select the profile for the account that has access to the repository.

For manual cloning, use the profile host alias directly:

git clone git@github.com-work:owner/repository.git

Do not use the plain provider host, such as git@github.com or git@bitbucket.org, when multiple accounts for that provider are configured on the same machine.

Push uses the wrong provider account

Check that the workspace has the correct active profile. Then check that the remote is SSH, not HTTPS.

Push returns HTTP 403

The remote is probably HTTPS. Use HTTPS -> SSH in the Git Remotes block.

SSH test works but push still fails

The SSH key is valid, but the Git remote may still be HTTPS or may use the wrong host name.

Profile is missing in another repo

Profiles created in the manager are global. If an old profile exists only in a previous repo's .vscode/settings.json, open that repo once so the extension can import it.

Duplicate profiles keep appearing

Create one profile per provider account or SSH key. For future repositories, use Apply or SSH Profiles: Git Clone; do not use Create Profile or Generate Key unless you are setting up a new account/key.

Key shows missing

The private key path in the profile does not exist on disk. Edit the profile and choose the correct key path.

Optional Settings

Most users do not need to edit settings manually.

Useful options:

{
  "sshProfileSwitcher.showRecommendationOnOpen": true,
  "sshProfileSwitcher.autoApplyRecommendedProfile": false,
  "sshProfileSwitcher.rewriteRemoteOnApply": false,
  "sshProfileSwitcher.writeCoreSshCommand": true,
  "sshProfileSwitcher.writeOpenSshConfig": true,
  "sshProfileSwitcher.writeVsCodeGitSshCommand": false,
  "sshProfileSwitcher.sshCommandExtraArgs": []
}

The extension uses Git core.sshCommand by default because it works from VS Code Git and from the terminal.

writeOpenSshConfig is enabled by default. It only manages SSH config blocks marked with GitHub SSH Profile Switcher comments and avoids overwriting manual Host entries with the same alias. If a generated key would reuse a host alias already assigned to another saved profile with a different key, the extension shows a warning instead of changing that alias.

git.sshCommand is disabled by default because some VS Code environments reject programmatic updates to that setting.

Support

Report bugs and request features here:

https://github.com/TigerDev-Studio/My-Tools-Issues/issues

When reporting an issue, include your VS Code version, extension version, operating system, Git remote URL style, and the error message you see.

Privacy

The extension does not send SSH keys, profile data, Git remotes, or Git identity data to an external service. It runs locally inside VS Code.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft