2

Say I wanted to setup a server, where I could create GIT repositories for users. I would only give them access via SSH.

I would need to restrict them to say 100megs or 1 gig etc.

Is this a complicated setup or one of the more straight forward setups?

4 Answers 4

1

All you need is ssh access to a machine with git installed. Just make sure you lock down the accounts with quotas and other precautions. Use "git-shell" for the accounts, and you're all set.

1

A friend showed me Gitosis. I use this to set up my repositories (it manages permissions based on SSH key, etc), but it won't help with the quotas.

0

I was asked to do this recently. I found these links helpful:

Between these two things, I have happy engineers.

0

This would be a fairly straightforward setup once you have a Linux server up and running. To limit disk space on a per-user or per-group basis, you'd want to set up quotas. Here's a good guide to use as an example.

Since your users will have SSH access, you don't necessarily need to set up any sort of fancy git server (like Gitosis) unless you want to have special permissions. Even then, you could use ACLs to handle that.

As for actually creating the git repositories, it's as simple as this:

cd /srv/git/somerepo.git/
git init --bare

...and then setting the correct permissions.

The users can then clone their git repository using a command like this:

git clone ssh://username@server/srv/git/somerepo.git/

Not the answer you're looking for? Browse other questions tagged .