simple HTTP publishing of Git repositories

For my public Git repositories, I still mostly use third party services like Bitbucket, Gitlab, Notabug, and Github. The advantage of course is that these services are well-known, and they keep traffic away from a private server or something like SDF.

On the other hand, providing your code through these services will get them data about your visitors, and it also makes your publication dependent on them. At least as a backup, it would be nice to serve your code through an independent facility, but you may not want to run a Git server (Gogs, Gitlab, etc). In principle, you can directly use a webserver, but you need to correctly set up the folders; just making a clone world-readable will not suffice.

In short, you have to run git update-server-info in each repository, as I recently learned from a nice little post by "Solene" with the title How to publish a git repository on http.

I'm using the following script to update the repositories on my gits webpage, but I still need to pull all content from third party sides together; only the most important repos are already included.

( is a script contained in my "plog" repo: it basically runs on all *.md files with some HTML header and body stuff, and also generates my phlog/glog/blog entries, in combination with lynx. )

cd $HOME/html/gits
cat > $index
cat << EOH >> $index


## repositories:

for nn in *
do if test -d $nn
then cd $nn
 git update-server-info ../y.css
 cd -
 echo "- [$nn]( $nn/README.html )  " >> $index
 echo "  \`git clone http://$wdir/$nn/.git $nn\`" >> $index

cat << EOH >> $index


_(generated `date -u`)_
EOH y.css