1

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?

user2071938
  • 2,055
  • 6
  • 28
  • 60
  • What is the name of the file you put in `gitolite-admin/keydir` folder? What version of gitolite are you using? – VonC Dec 04 '14 at 09:47
  • it is the username on the unix machine so, user.pub the current version in the apt-get repository – user2071938 Dec 04 '14 at 09:55
  • Why are you using `user`? for `user@server-ip`? It usually is `git@server-ip`, or whatever account you used to install gitolite. – VonC Dec 04 '14 at 09:56
  • yes on the Server, but on the clients every employee will have its own account on the git server – user2071938 Dec 04 '14 at 09:59

1 Answers1

0

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?".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • ah ok, but how can I set different rights to the repositories then? – user2071938 Dec 04 '14 at 10:11
  • @user2071938 through the gitolite-admin/conf/gitolite.conf: http://gitolite.com/gitolite/conf.html – VonC Dec 04 '14 at 10:13
  • but how does gitolite know which user is connecting? via the ssh keys? – user2071938 Dec 04 '14 at 10:15
  • 1
    @user2071938 exactly: that is why you must name the public key which you are putting in `gitolite-admin/keydir` after the user name. Again, this is explained in http://stackoverflow.com/a/13320256/6309. – VonC Dec 04 '14 at 10:17