0

I'm trying to make my ubuntu system as shared git repository. Please tell me the steps. How to add users and make other user to access shared repository. And where to create user. I'm using ubuntu 12.04. I have created repos/project.git. I have initialized git using git init --bare. how to make other user to access. Please tell me the steps.

Cœur
  • 37,241
  • 25
  • 195
  • 267
TELMILA
  • 83
  • 9

1 Answers1

0

On its own, git doesn't deal much with user management, you control access via the environment. I don't know how this works with HTTP, but if you are using SSH (which I recommend) then each of your users need:

  • Some way to log on to your Ubuntu system. E.g. their own Unix account.
  • An SSH keypair which they can use to access that account, using public key (passwordless) authentication.
  • Then they need to set up their remotes to point at the repository on the server.

I've given the "compact" description, each of those points is a topic of its own too big for this space -- please ask for more help if you need it. If you don't want to do all that, you might install some management software (see Is there a commercial grade Git server product) I have only tried "gitolite" but I didn't like it.

If you do go the SSH + unix user route, you can improve security by configuring their accounts to use git-shell instead of the standard system shell, this will limit their activities to only the bare minimum needed to push and pull from git repos.

Community
  • 1
  • 1
Adrian Ratnapala
  • 5,485
  • 2
  • 29
  • 39
  • yes i'm going to use ssh. But how will create user and how they will access – TELMILA Mar 29 '14 at 13:13
  • You create users by whatever way you normally create Ubuntu users. I use the `adduser` command -- but there are GUI tools for that kind of thing too. They access their accounts using SSH. This also takes some setup; this tutorial http://support.suso.com/supki/SSH_Tutorial_for_Linux was the first google result I got, maybe there are better ones. – Adrian Ratnapala Mar 29 '14 at 13:19
  • If your users are already SSH savy, then you can just create the Unix accounts with a temporary password and say "hey, this is your account / password, you take care of the SSH keypair stuff yourself". – Adrian Ratnapala Mar 29 '14 at 13:22