The github instructions say to setup your SSH keys开发者_如何转开发 in ~/.ssh
using the windows git bash program.
I have in the past used Putty to manage ssh keys.
What is the difference between the 2 setups?
This is for my own git server.
I know this is a pretty old question, but here's the answer:
Basically, PuTTY stores all its sessions in the Windows registry, rather than in a config file in a home folder, whereas the default git+ssh setup uses openSSH and it's style of key configuration (files that are typically stored in ~/.ssh
, i.e., /home/<username>/.ssh
).
In Windows, if you'd rather use PuTTY than openSSH, set an environment variable named GIT_SSH to C:\your\putty\folder\plink.exe
. Then, you can reference any saved session in PuTTY by using a remote url of the form ssh://<session name>/<repository path>
. This allows you to, for example, specify particular keys with each session, similarly to how you could use ~/.ssh/config
to specify a particular key with the IdentityFile
option.
Git uses an SSH program to deal with SSH accesses, basically the default one depending on your system (look at the GIT_SSH
environment variable). So it's just to ease the configuration that they say to setup SSH keys in ~/.ssh
. If you want to put SSH keys in another directory, just tell it by using ssh-add /path/to/your/key
.
精彩评论