Git_Server.mdwn 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. [[!meta date="2014-02-17"]]
  2. This guide explains how to setup a git server on a home/community server using
  3. Gitolite and Gitweb, with lighttpd used as the webserver serving anonymous
  4. HTTP access to the repositories and the Gitweb pages.
  5. __This guide is written for Gitolite 2. Some things may work differently on
  6. Gitolite 3, and hopefully the guide will be updated when Partager's server moves
  7. to Gitolite 3. Anyway, the existing Gitolite 2 material won't be removed, only
  8. extended.__
  9. Contents:
  10. 1. [[!traillink Gitolite_Setup]]
  11. 2. [[!traillink Gitolite_Configuration]]
  12. 3. [[!traillink Anonymous_Read_Access_with_Git_Daemon]]
  13. 4. [[!traillink Web_Interface_using_Gitweb]]
  14. 5. [[!traillink HTTP_Anonymous_Read_Access]]
  15. 6. [[!traillink I2P]]
  16. 7. [[!traillink Mirrors]]
  17. 8. [[!traillink Summary]]
  18. 9. [[!traillink Useful_Links]]
  19. If you already somewhat familiar with these tools and just want a quick list of
  20. commands to run in order to setup the git server, go to the Summary section.
  21. Otherwise, the information in the other sections supplies useful information.
  22. Scenario
  23. ========
  24. You decided to start a [free software] project or some other kind of
  25. collaborative project, and you want to setup a git server which will collect the
  26. work of the team members and allow them to push their changes and pull others'
  27. changes. The server should provide authenticated write access and anonymous read
  28. access, and provide a convenient web interface for browsing the repositories.
  29. The server should provide fine access control over who can do which changes to
  30. which repository.
  31. This document also explains how to route the traffic through I2P, making it
  32. possible to connect to the server anonymously without revealing your IP. It can
  33. protect both the server owner's identity and the client's identity, and all
  34. communications are encrypted. Visit the [I2P website](geti2p.net) for more
  35. information.
  36. Some of the examples assume the server is *local*, i.e. you run it from your own
  37. machine. If this is not the case, i.e. the server is remote, simply replace
  38. 'localhost' or '127.0.0.1' with your server's IP or domain name where needed.
  39. You can get remote shell access via SSH, e.g. `ssh joe@mysite.org` and copy
  40. files remotely using the `scp` command instead of the regular `cp` where needed.
  41. Features
  42. ========
  43. + Fine per-repository access control (Gitolite)
  44. + Anonymous HTTP repository access and web interface (Gitweb)
  45. + Web server to serve the HTTP content (lighttpd)
  46. + Read access via the git protocol (git-daemon)
  47. + Write access via SSH (openssh-server)
  48. + I2P acess
  49. Software Details
  50. ================
  51. GNU/Linux distribution used: Debian 7 stable.
  52. Package versions:
  53. git................ 1:1.7.10.4-1+wheezy1
  54. gitolite........... 2.3-1
  55. lighttpd........... 1.4.31-4+deb7u2
  56. gitweb............. 1:1.7.10.4-1+wheezy1
  57. git-daemon-run..... 1:1.7.10.4-1+wheezy1
  58. git-daemon-sysvinit 1:1.7.10.4-1+wheezy1
  59. openssh-server..... 1:6.0p1-4
  60. perl............... 5.14.2-21+deb7u1
  61. I2P................ 0.9.11
  62. [free software]: https://www.gnu.org/philosophy/free-sw.html