The idea here is to allow anyone to download your GIT repository using the native git protocol. This is similar to the post I wrote about Creating a secure Git repository server, but the below method allows full read only public access to the repositories.
Start out by modifying the new file git-daemon.
vim /etc/xinetd.d/git-daemon
Add the below text to the file.
# description: The git daemon offers anonymous access to git repositories
service git
{
disable = no
type = UNLISTED
port = 9418
socket_type = stream
wait = no
user = git
server = /usr/libexec/git-core/git-daemon
server_args = --inetd --export-all --base-path=/var/git
log_on_failure += USERID
}
You may need to change the location of the git-daemon (the above example is from Fedora) and you will need to update the location of your git repository directory.
The above configuration will share ALL the git repositories in the /var/git directory.
If you do not wish for the all repositories to be public, you may remove the --export-all flag and add a empty file named git-daemon-export-ok to the git repository you wish to still share.