#!/bin/sh # A .cgi-named door onto the stock backend, because mod_cgi dispatches by # extension. No policy in here: writes are decided by the pre-receive hook. # # It must stay a plain exec. REMOTE_USER is the identity the hooks authorise # from, and rewriting the environment here denies every push. set -eu BACKEND="${GIT_HOST_HTTP_BACKEND:-/usr/libexec/git-core/git-http-backend}" [ -x "$BACKEND" ] || { printf 'Status: 500 Internal Server Error\r\n\r\n' >&2; exit 1; } exec "$BACKEND"