I wanted to share the talk and chose Git as a means for it. Gustaf helped me figure out how to serve Git over HTTP with Naviserver and rewrote nscgi in Naviserver 5.1 to make the setup simpler. Here it is:
- Git root
/srv/git, directory which holds any number of bare git repos.- CGI script
/srv/git/gt, we need to strip the/srvprefix from thePATH_INFOenvironment variable. Otherwise we could callgit http-backenddirectly from Naviserver.- Naviserver
- We need to add the
GIT_PROJECT_ROOTenvironment variable so git needs to now where the repos are. - Naviserver configuration file snippet (Naviserver 5.1+ only):
-
ns_section ns/server/eurotcl2026/module/nscgi { ns_param map "GET /git/*.git /srv/git" ns_param map "POST /git/*.git /srv/git" ns_param interps git } ns_section ns/interps/git { ns_param .git { program /srv/git/gt env {GIT_PROJECT_ROOT /srv/git} } } - /srv/git/gt
-
#!/bin/sh PATH_INFO=${SCRIPT_NAME#/git}$PATH_INFO exec /usr/lib/git-core/git-http-backend