Mirror of the Rel4tion website/wiki source, view at <http://rel4tion.org>
Clone
HTTPS:
git clone https://vervis.peers.community/repos/yEzqv
SSH:
git clone USERNAME@vervis.peers.community:yEzqv
Branches
Tags
Git_Server.mdwn
[[!meta date=“2014-02-17”]]
This guide explains how to setup a git server on a home/community server using Gitolite and Gitweb, with lighttpd used as the webserver serving anonymous HTTP access to the repositories and the Gitweb pages.
This guide is written for Gitolite 2. Some things may work differently on Gitolite 3, and hopefully the guide will be updated when Partager’s server moves to Gitolite 3. Anyway, the existing Gitolite 2 material won’t be removed, only extended.
Contents:
- [[!traillink Gitolite_Setup]]
- [[!traillink Gitolite_Configuration]]
- [[!traillink Anonymous_Read_Access_with_Git_Daemon]]
- [[!traillink Web_Interface_using_Gitweb]]
- [[!traillink HTTP_Anonymous_Read_Access]]
- [[!traillink I2P]]
- [[!traillink Mirrors]]
- [[!traillink Summary]]
- [[!traillink Useful_Links]]
If you already somewhat familiar with these tools and just want a quick list of commands to run in order to setup the git server, go to the Summary section. Otherwise, the information in the other sections supplies useful information.
Scenario
You decided to start a free software project or some other kind of collaborative project, and you want to setup a git server which will collect the work of the team members and allow them to push their changes and pull others’ changes. The server should provide authenticated write access and anonymous read access, and provide a convenient web interface for browsing the repositories. The server should provide fine access control over who can do which changes to which repository.
This document also explains how to route the traffic through I2P, making it possible to connect to the server anonymously without revealing your IP. It can protect both the server owner’s identity and the client’s identity, and all communications are encrypted. Visit the I2P website for more information.
Some of the examples assume the server is local, i.e. you run it from your own machine. If this is not the case, i.e. the server is remote, simply replace ‘localhost’ or ‘127.0.0.1’ with your server’s IP or domain name where needed. You can get remote shell access via SSH, e.g. ssh joe@mysite.org
and copy files remotely using the scp
command instead of the regular cp
where needed.
Features
- Fine per-repository access control (Gitolite)
- Anonymous HTTP repository access and web interface (Gitweb)
- Web server to serve the HTTP content (lighttpd)
- Read access via the git protocol (git-daemon)
- Write access via SSH (openssh-server)
- I2P acess
Software Details
GNU/Linux distribution used: Debian 7 stable.
Package versions:
git................ 1:1.7.10.4-1+wheezy1
gitolite........... 2.3-1
lighttpd........... 1.4.31-4+deb7u2
gitweb............. 1:1.7.10.4-1+wheezy1
git-daemon-run..... 1:1.7.10.4-1+wheezy1
git-daemon-sysvinit 1:1.7.10.4-1+wheezy1
openssh-server..... 1:6.0p1-4
perl............... 5.14.2-21+deb7u1
I2P................ 0.9.11