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?
-
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.
From Geoff Fritz -
I was asked to do this recently. I found these links helpful:
- setting up a public git repository
- Everyday Git in 20 or so commands (scroll down to "Repository Maintenance")
Between these two things, I have happy engineers.
From David Mackintosh -
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.
From mwalling -
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/
From Nick Pegg
0 comments:
Post a Comment