On Sun, 12 Aug 2012 06:22:38 -0700 (PDT)
the5kyliner <s...@stageclear.de> wrote:

> Hey guys,
> finally installed git on my linux server.
> I configured the ssh keys, but I want to connect with a windows
> computer to the server now, and the server doesnt seem to find my ssh
> key.
> I put it on my D drive somewhere and now, if I want to copy my
> repository via git, it asks for a password for gitosis.
> I think he wants so check the ssh key now, but how can I tell the
> server, that my key is in D:\...\.... ?

Keys in SSH have two parts: private and public.  When you generate an
SSH key, you transfer its public part to the server you want to
authenticate against, and add it to the list of authorized keys
(~/.ssh/autorized_keys) of the user you want to authenticate as.
After that, when you try to authenticate at that server using your
private key, the authentication protocols uses both parts of the key to
verify your authenticity.

In the case of gitosis, the matter is a bit more complicated: since the
chief reason gitosis exists is to "virtualize" the Git-only users (that
is, to not burden the server's administrator with creating a dedicated
system account for anyone just wanting to access Git repos on that
server), gitosis uses just one system account, and then distinguishes
its virtualized userd by their public keys.

Now let's consider one other aspect of how SSH works.

First, note that it's customary to have one's private key encrypted
using a password: this ensures that when a key is lost (stolen, for
example), it requires more work for the attacker to actually misuse it
as they now need to decrypt the key first.  Having one's key encrypted
naturally means SSH client asks for the password when it tries to load
the key.  Exactly how it looks, depends on how your system is set up:
if you're using an SSH key agent, the password is asked once per
session, otherwise it's asked each time the key is needed.

Second, SSH supports several authentication mechanisms, and
public-key-based authentication is just one of them.  Another very
popular one (and usually enabled by default on SSH servers) is
password-based, called "keyboard-interactive" by SSH.
When SSH client and server settle on using the keyboard-interactive
authentication method at the handshake time, you are also prompted for
the password.

By now, you should see that it's not enough for us to know you're
seeing a password prompt--please be more specific about what exactly
you're seeing.

The next thing you should understand by now is that the server is not
involved in "finding your key"--if you properly submitted the public
part of your key to gitosis, you then need to make sure your SSH
*client* is able to find and use the private part of your key.
And this one heavily depends on your setup: unfortunately, with Git for
Windows, there are (at least) two ways to use SSH client: 1) the
"ssh.exe" binary from OpenSSH, bundled with Git for Windows; 2) the
"plink.exe" binary from PuTTY [1] (not included with Git for Windows).
Hence, to help you debug this, we have to know your setup, of which you
provided almost zero details.

If we assume you're using built-in SSH client (it's true if you did not
do anything to install/enable PuTTY), your private key is expected to
be under your ~/.ssh folder, and it should be named "id_rsa".
Translating this to Windows, the file should be
where YOU is your username.

This assumes, the SSH key has been generated by the ssh-keygen tool
from the OpenSSH distribution.  You also did not tell us how you
generated your key, so I have to guess here.

1. http://www.chiark.greenend.org.uk/~sgtatham/putty/

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to