Live data from Hacker News

Code your own Multi-User Private Git Server

moocode.com

11–18 of 18 posts

Re: Code your own Multi-User Private Git Server

#11
So, most of this is based on the ability to specify the command that the user is forced to run in authorized_keys to be a wrapper command that you wrote. This wrapper command reads its arguments and then will execve git shell as appropriate.

What's important to note is that this also talks about SSH_ORIGINAL_COMMAND, which is the environment variable set by sshd when invoking the forced command that is specified in authorized_keys.

Clever hack.

Re: Code your own Multi-User Private Git Server

#12

This just seems to be a case of Not Invented Here syndrome. Using gitolite or gitosis would have done the job faster, gives you the ability to have acl's set up per user and all of it uses simple configuration files.

To be fair, the example I have given is simple and you could use something like gitosis or gitolite (I have used them in the past). The point of the article was supposed to be a starting point if you have something else you want to do. For example, I needed to have a fully distributed git backend system across multiple git storage nodes so I needed to learn how I would go about doing that. This post was supposed to g…

For what you are suggestion wouldn't it be simpler to start with a known code base such as gitolite and to then add the modifications you require?

Re: Code your own Multi-User Private Git Server

#15
post #13

I use gitosis, and it's very simple to set up and manage. It doesn't feel like overkill at all.

I was using Gitosis, now i switch to Gitolite, it's better and simpler.

Gitolite is also well supported. Gitosis is basically an abandoned project. kernel.org's new git infrastructure will be using gitolite which means you can pretty much count on it being supported well into the future.

Re: Code your own Multi-User Private Git Server

#16

This just seems to be a case of Not Invented Here syndrome. Using gitolite or gitosis would have done the job faster, gives you the ability to have acl's set up per user and all of it uses simple configuration files.

NIH or not, I enjoyed reading this post. It showed the simplicity of serving git repos and walked readers through the entire process top to bottom.

Gitolite is a great project and it has many useful features such as branch-level access control. That might be what he meant by "overkill". He simply didn't need those features. I think there's much to be said for keeping things simple.

Re: Code your own Multi-User Private Git Server

#18
Isn't the point of the D in DVCS that this is supported out of the box? What's wrong with:

  root@server# apt-get install git-core

  git@server$ mkdir ~git/repo.git
  git@server$ git init $!

  user@client$ git remote add origin ssh://git@server/repo.git
Post reply on HN