I downloaded the portable version of Git for Win32, the one that comes in a self-extracting package. I wanted to be able to push commits from anywhere (my flashdrive), but I have no idea how to use a public key that isn’t in users/USERNAME/.ssh. How can I configure Git to automatically use keys in another directory?
(I can generate keys in other directories, but Git automatically sends the keys in c:/users/me/.ssh)
NOTE: I am using Win32! Not Linux or OSX!
msysgit will actually use public/private keys in
%HOME%/.ssh.By default, msysgit defines HOME to
C:\users\USERNAME, but nothing prevents you to defineHOMEto any path you want.Simply define a user environment variable ‘
HOME‘, and then all your shell/DOS sessions will inherit that new value.