How to setup public git repositories?

不问归期 提交于 2019-12-02 18:21:58

I believe (but I have not tried it yet) that gitosis is the way to go in order to:
Update: 2011, I have actually deployed gitolite

  • make hosting git repos easier and safer. It
  • manages multiple repositories under one user account, using SSH keys to identify users.
    End users do not need shell accounts on the server, they will talk to one shared account that will not let them run arbitrary commands.

The installation process I recommand is one done from a client post in order to copy the full installation of gitolite on the server:

(from-client method) install from the client to the server

Remember: gitolite manages authorization, not authentication (SSH): it can be used without SSH, but its natural deployment is through SSH and the forced command mechanism. (like gitosis was, but with many more features)


Old references for gitosis:

Here is a step-by-step tutorial.

And then an application of the tutorial: Gitosis — making hosting multiple Git repositories manageable (for Mac) or installing gitosis on Ubuntu

Followed by: Adding users to our secure Git setup

Finished with: Git subprojects (since your gitosis server manages all those different git repositories)


For truly light (cgi server) public Git repositories, you can:

  • set up a git server: git-daemon; it will listen on port 9418. By default, it will allow access to any directory that looks like a git directory and contains the magic file git-daemon-export-ok. Passing some directory paths as git-daemon arguments will further restrict the exports to those paths.
    You can also run git-daemon as an inetd service;
  • export with http place the newly created bare git repository in a directory that is exported by the web server, and make some adjustments to give web clients some extra information they need

Here is how to do it on an Apache server.


The 2010 article "8 ways to share your git repository" mentions all the possibilities to give access to a Git repository.

stigkj

You could just do

git instaweb

if you have lighttpd installed. That is only the web GUI, though.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!