Search code examples
gitgitolitegit-bash

gitolite SSH Problems


I have Problems to connect to my gitolite server via GIT-Bash on Windows. I have done the following:

ssh-keygen -t rsa

on my local windows machine an the git-bash. Afterwards I copied this keyfile to

gitolite-admin/keydir 

on my the linux machine running the gitolite server

Then I added the new keyfile and commited/pushed the repository.

But everytime I try to do

git clone user@server-ip:testing.git

I get

fatal: 'testing.git' does not appear  to be a git repository
fatal: could not read  from remove repository

Please make sure you have the correct access rights and the repository exists

I had the same error message at the beginning when I tried to clone the gitolite-admin repo due invalid ssh-keys.

Any Ideas?


Solution

  • If you are using gitolite, your ssh url must use the account used for installing gitolite (for example git), even if all users have an account on that server.

    git clone git@server-ip:testing.git
    

    It is the public key used for that ssh connection which will help gitolite authenticate the user requesting the clone.

    See also for more "How do programs like gitolite work?".