Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to include ssh private rsa key when accessing git repo via ssh (gitosis)?
    primarykey
    data
    text
    <p>At this moment I've got one git repo added through gitosis. The manual i used is <a href="http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way" rel="nofollow">http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way</a></p> <ol> <li><p>I can clone it and push in it via ssh auth with private and public keys (on gentoo), but windows users which are using Git Extensions can not. SSH keys placed in $HOME/.ssh, and ssh asks for a password. Nor password, nor passphrase (from private ssh key) don't match.</p></li> <li><p>Redmine needs for a bare repo, so i cloned repo from gitosis on my local machine and moved it to server (redmine + git), then tried to sync like showed here <a href="http://www.redmine.org/projects/redmine/wiki/HowTo_keep_in_sync_your_git_repository_for_redmine" rel="nofollow">http://www.redmine.org/projects/redmine/wiki/HowTo_keep_in_sync_your_git_repository_for_redmine</a> But it asks for a password again! Of course I didn't make apache his own ssh keys to auth gitosis =_= (Apache is owner of redmine bare repo, cause it access it through http auth)</p></li> </ol> <p>Anyway the question is how to use private ssh key from file when accessing to gitosis?</p> <p>===</p> <p>Partially solved! <code>ssh-keygen -t rsa</code> generates keys, which names are exactly <strong>id_rsa</strong> and <strong>id_rsa.pub</strong>. if you run <code>ssh -vvv gitosis@your-server.com</code> you should see something similar to</p> <pre><code>debug1: Authentications that can continue: publickey,keyboard-interactive … debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Offering RSA public key: user@domain-user debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug1: Authentications that can continue: publickey,keyboard-interactive debug1: Trying private key: /home/user/.ssh/id_rsa debug3: no such identity: /home/user/.ssh/id_rsa debug1: Trying private key: /home/user/.ssh/id_dsa debug3: no such identity: /home/user/.ssh/id_dsa debug1: Trying private key: /home/user/.ssh/id_ecdsa debug3: no such identity: /home/user/.ssh/id_ecdsa debug2: we did not send a packet, disable method debug3: authmethod_lookup keyboard-interactive </code></pre> <p>So, ssh client wants exactly named files or will switch to next auth method (password). Now i renamed keys on my home machine and:</p> <pre><code>user@home ~ $ git clone ssh://git@your-gitosis-server/reponame.git Cloning into reponame... Enter passphrase for key '/home/user/.ssh/id_rsa': </code></pre> <p>Hurray, it asks for a <em>passphrase</em>! BTW, ШIИDOШS™ users are still having problems with their tens of generated keys.</p> <p><strong>Upd</strong></p> <p>If you use OpenSSH, then in ~/.ssh you may create a file named ‘config’ and put there something like this:</p> <pre><code>Host mygitosisserver.com IdentityFile ~/.ssh/private-key-for-mygitosisserver-com </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload