Configure Git With Existing Keys
You just need to copy your id_rsa
and id_rsa.pub
keys (which you previously saved) to C:\Users\YourAccount\.ssh
(create a directory " .ssh
" if it doesn't exist).
This path is git-cmd.bat
(in msysgit ) defines in %HOME%
, and ssh needs to look for your keys in %HOME%/.ssh
.
Note that it is important to HOME
be defined by the msysgit session (a cmd
or git-bash
), as the OS itself never defines an environment variable HOME
(it uses instead USERPROFILE
, which ssh knows nothing about).
source to share