simple HTTP publishing of Git repositories
For my public [1]Git repositories, I still mostly use third party
services like [2]Bitbucket, [3]Gitlab, [4]Notabug, and [5]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
[6]How to publish a git repository on http.
I'm using the following script to update the repositories on my [7]gits
webpage, but I still need to pull all content from third party sides
together; only the most important repos are already included.
( poorkyll.sh is a script contained in my "plog" repo: it basically
runs Markdown.pl on all *.md files with some HTML header and body
stuff, and also generates my phlog/glog/blog entries, in combination
with lynx. )
__________________________________________________________________
#!/bin/sh
index=index.md
wdir=yargo.sdf.org/gits
cd $HOME/html/gits
cat README.md > $index
cat << EOH >> $index
---
## repositories:
EOH
for nn in *
do if test -d $nn
then cd $nn
git update-server-info
poorkyll.sh ../y.css
cd -
echo "- [$nn]( $nn/README.html ) " >> $index
echo " \`git clone http://$wdir/$nn/.git $nn\`" >> $index
fi
done
cat << EOH >> $index
---
_(generated `date -u`)_
EOH
poorkyll.sh y.css
__________________________________________________________________
.:.
References
1.
https://git-scm.com/
2.
https://bitbucket.org/
3.
https://gitlab.com/
4.
https://notabug.org/
5.
https://github.com/
6.
gopher://perso.pw/0/solene/article-23.txt
7.
http://yargo.sdf.org/gits