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?

closed as too broad by masegaloeh, Jenny D, Jim B, ceejayoz, Scott Pack Apr 23 '15 at 2:22

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

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 or ask your own question.