That what i do to store all my ssh keys in separate folders on windows.
- You need to create a ssh key. To do this run
ssh-keygen -t rsa -C "your_email@example.com"command, when it promt for location - enter valid path to file where you whant to store them, like this:Enter file in which to save the key (/c/Users/nikol//.ssh/id_rsa): /d/Documents/SMTH/SSH/github/id_rsa. This will create bothid_rsaandid_rsa.pub. - Copy content of
id_rsa.pubto your GitHub account ssh-keys settings. - Check your
HOMEvariable. In cmd runecho %HOME%. If there is no HOME path, just create it for current user. You need to create%HOME%\.ssh\configfile, if.sshfolder does not exists - create it. Add toconfigfile this lines (IdentityFileis the path where you store your id_rsa in first step.):
Host github.com
Hostname github.com
User git
IdentityFile /D/Documents/SMTH/SSH/github/id_rsa
To check that all works run ssh -T git@github.com in cmd. It should congratz you with successfully authenticatiuon.