This is a Windows utility that allows multiple users to share a pairing station while using their own
user.email for commits and SSH key for interacting with GitHub.
It will update the
~/.ssh/config files on your machine.
When you run the
.exe, GitSwitch will put an icon in the taskbar tray.
Right-click on it for options to:
- Edit (add / update / remove) user info.
- Select a user; this will configure the machine with their info.
For improved security, you can keep your SSH key on a removable drive. If the drive letter changes (or if the SSH key file changes for any reason), GitSwitch will warn you about the problem. You will need to use the "Edit Users..." option to update the path to your SSH key.
GitSwitch expects your unix home (
~) folder to be the same as your Windows User Profile folder (e.g.
If this is not the case, GitSwitch may change config files which are not in use by git/ssh.
New drives not recognized by git bash shell
If you plug in a drive (e.g. USB) while your git bash shell is open, the drive may not be recognized.
When you do an SSH operation (such as
git pull) you'll get an error message something like this:
no such identity: /F/ssh_keys/id_rsa: No such file or directory Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
ssh-agent is running it may not recognize drive changes,
and won't be able to find your SSH key (giving the same error as above).
You must end the
ssh-agent process to get past this error.
GitSwitch has an option to "Kill ssh-agent on user change" which, when checked,
will kill all
ssh-agent processes for you whenever you change users.
This option is not checked by default (but will be remembered if you check it).
Mapping your USB drive to a specific drive letter
If you map a USB drive to a specific drive letter, you may avoid some issues of getting a different drive letter assigned. To do this:
- In File Explorer, right-click on 'This-PC' in the left nav
- Click 'Manage'
- Select 'Disk Management' under 'Storage'
- Click 'Change Drive Letter and Paths...'
- Assign a drive letter and click 'OK'
Working on GitSwitch
Please remember to bump the version number (using semantic versioning rules)
AssemblyInfo.cs file for issue tracking purposes.
Q: Will GitSwitch clobber my
A: Maybe. But it isn't supposed to. You may want to backup your config files before using. Please create an issue with an example config file if you encounter this problem.
Q: What's with that icon?
A: Yeah, I know; I'm a programmer. It's supposed to be the git (bash) logo combined with a user icon.