3

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 anyone managed to do this with gitoite?

sethvargo
  • 26,739
  • 10
  • 86
  • 156

2 Answers2

1

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

eckes
  • 64,417
  • 29
  • 168
  • 201
1

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

Chris Olstrom
  • 71
  • 1
  • 4