1

I have set up my GIT server on Ubuntu Server (Latest):

I used puttyGen in windows to create a public and private key. I then uploaded the public keys to 'keydir' in 'gitolite-admin' and pushed it back to the server. So good so far.

At this point I then changed my conf file to this:

@admin = gitolite
@dev = user1 user2

repo gitolite-admin
    RW+     =   @admin

repo site
    RW+     =   @dev


repo testing
    RW+     =   @all

For those wondering, I do have a user1.pub and user2.pub in my keydir.

At this point I loaded up GIT extensions and tried connecting in the following ways: gitolite@myserver:site with SSH key user1.ppk

However when I pressed "try connection" It logs me in as gitolite and lists ALL repositories, including the admin, which it shouldn't see. (I expected just to see "site" listed) but obviously its logging in as "gitolite"

I then tried doing user1@server:site" and was presented with apassword for user1`.

Where am I going wrong, I looked over the docs and couldn't find anything. I'm obviously making such a rookie mistake here...

JustAnotherDeveloper
  • 3,167
  • 11
  • 37
  • 68

1 Answers1

1

"Seeing all repos" means you are somehow bypassing gitolite.

An ssh connection to a gitolite server must always be done with the account which manages gitolite repos: git or gitolite (I doubt it is gitosis, as in your question), you would never connect as user1.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Changed back to "gitolite" decided to switch today. thanks, so I will always connect as gitolite that makes sense. What about being able to limit the repositories the user see's? The conf seems correct at a glance, unless it's just GIT Extensions getting things wrong? – JustAnotherDeveloper Feb 21 '13 at 20:33
  • @JustAnotherDeveloper you could check the content of `~gitolite/.ssh/authorized_keys` and see if the `gitolite` command is called, for user1 or user2 public key. See http://stackoverflow.com/a/13320256/6309 and http://stackoverflow.com/a/11491498/6309. – VonC Feb 21 '13 at 22:00