开发者

public repository with gitolite

开发者 https://www.devze.com 2023-02-08 08:27 出处:网络
I installed an configured gitolite and it works for some other projects I\'m working on. However, I want to set up a public repo that anyone call clone from (but not push).

I installed an configured gitolite and it works for some other projects I'm working on. However, I want to set up a public repo that anyone call clone from (but not push).

I've searched everywhere and cannot find a way to do this? Has any开发者_开发问答one managed to do this with gitoite?


Seems like this guy has done it and provides a HowTo for Debian and Gentoo. Using the git daemon is the solution.


Building on eckes' answer, adding daemon as a read-only user to any repo will render it accessible via the git:// protocol, assuming you have git-daemon configured (ships with git, may require minimal configuration).

While I haven't verified the exact process for GNU/Linux, on FreeBSD it works like so:

The following assumes you have a working git + gitolite system configured at /usr/local/git.

# echo 'git_daemon_enable="YES"' >> /etc/rc.conf
# echo 'git_daemon_directory="YES"' >> /etc/rc.conf
# echo 'git_daemon_flags="--syslog --detach --base-path=/usr/local/git"' >> /etc/rc.conf
# service git-daemon start

If you want to have all repositories automatically public, append --export-all to the git_daemon_flags above. Otherwise, add the daemon user with at least R privileges to whichever repos you want to make public, and gitolite will handle the rest.

Sources

  • http://sitaramc.github.com/gitolite/doc/2-admin.html#_specifying_gitweb_and_daemon_access
  • http://forums.freebsd.org/showthread.php?t=10810
0

精彩评论

暂无评论...
验证码 换一张
取 消