This script is useful when you have multiple SSH keys on your system, eventually having several SSH keys tied to different accounts for the same domain.
It makes use of the core.sshCommand
git configuration directive to assign a specific SSH key to a repository.
The script will look for SSH keys in ~/.ssh
You'll also need bash
and git
installed on your system.
From the Terminal, move to the directory you want to install this script (I recommend a directory with your $PATH environment variable) and execute those commands:
wget https://gist.github.com/chsxf/7f7ca32bf436d8f9f0fe35e2bb9d1b63/raw/gsetsshcfg
chmod +x gsetsshcfg
gsetsshcfg
The script will then guide you through the process.