My authentication keeps failing. I've created my SSH keys and the public key has been imported by the local git admin, but I still get prompted for a password:
git.exe clone --progress -v "git@repo:project.git" "C:\web\project"
Cloning into C:\web\project...
git@repo's password:
fatal: The remote end hung up unexpectedly
- My SSH keys are passphraseless and live under "
C:\Documents and Settings\username\.ssh
" and I also copied them to "C:\Documents and Settings\username\ssh
" (without the preceding dot) just for good measure. - In the Windows environment variables screen, the
HOME
system var is set to the correct directory for my user.
What does
ssh -vvv git@repo
returns?As long as this ssh request doesn't work, no git operation will work with the
git@repo
server.And if the ssh reports it is does try to offer the publickey, then you must double-check it has been correctly added to the
~git/.ssh/authorized_keys
file on the repo server.Here is an extract of example of a ssh session which works:
Two comments:
%HOME%
reference not%HOMEDIR%
but a custom drive (p:\
), this is a local convention at work and might not apply to you.id_rsa.pub
/id_rsa
)I have added a
config
file in the%HOME%\.ssh
directory in order to name explicitly the public key file:That way, I can simply type:
ssh gitrepo
, and ssh will know which user, hostname and exact full path of the public key to use.