Git does not require a special “server” to run. For example, if you are on a local network, you can just put the repository on a shared network drive. Git does not handle the security. You configure the read/write access on the folder. I’m not an expert in system administration so I’m going to suggest some options and provide links that I found helpful:

  • Ssh is you friend for security. If you do not want to provide shell access to everyone, you can setup one git user and use ssh keys to provide access. If you go that route, take a look at gitosis, which is a bunch of python scripts that automates part of administering that kind of setup. Gitosis gives you a git repository to configure access and projects. It’s very nice.
  • Another option is through http. You need webdav for that.
  • Git daemon comes with git and is perfect if you only need to quickly give public read access.
  • There are couple of git hosting site that are popping up. Check out repo.or.cz and Github (invitation only for now but has a sexy look).

Popularity: 100% [?]

 

6 Responses to How To Set Up A Git Server

  1. Derek Mahar says:

    I think the “through http” link refers to the wrong location. It refers to the same article as “one git user and use ssh keys” which explains how to host a Git repository using SSH, not HTTP.

  2. Jean-François, you didn’t mention Gitorious:”http://gitorious.org/” in your hosting sites list. Gitorious has a nice look too, and I actually moved the “Piston”:http://piston.rubyforge.org/ repository there.

  3. jfcouture says:

    I just found out about gitorious a couple of days ago. New git hosts seem to be popping up left and right. If you find any other ones, please feel free to add to the comments.

  4. Derek Mahar says:

    Do any of the Git hosts other than repo.or.cz allow you to delete your project or the project Git repo? I appreciate repo.or.cz, but one of its drawbacks is that it doesn’t allow you to delete a project or your project Git repo in case you ever mess up your project Git repo and want to re-create it.

    Does Git allow a user to delete and re-create the master branch in a remote repository? This would solve the problem on repo.or.cz that I mention above.

  5. jfcouture says:

    It depends on the kind of mess you created. Take a look at the git reset command. It can be used to completely destroy revisions. However, if that is on public repo, then it’s very dangerous. If other people cloned the repo and have commits based on the revision you destroyed, it’s going to be painful to recover from that.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>