github account must be configured to connect using ssh Connect to github using SSH
For ghswitch to function, your ssh private key must have a comment. You can add a comment to an existing ssh private key using using
ssh-keygen -c -f ~/.ssh/private_key
The installation instruction assumes /usr/local/bin/
is part of your shell's $PATH
environment variable.
Using curl:
sudo curl -L -o /usr/local/bin/ghswitch https://raw.githubusercontent.com/sageil/ghswitch/main/ghswitch && sudo chmod +x /usr/local/bin/ghswitch
Using wget:
sudo wget -O /usr/local/bin/ghswitch https://raw.githubusercontent.com/sageil/ghswitch/main/ghswitch && sudo chmod +x /usr/local/bin/ghswitch
- ghswitch -f=me@host.com -t=me@otherhost.com
- ghswitch --from=me@host.com --to=me@otherhost.com
- ghswitch -h
ghswitch was tested on macOS ventura, Ubuntu and Almalinux using stand-alone Terminal Emulators and Visual Studio Code terminal.