From 4a46bf92e6306458ed0cfc375c71618c648ac85a Mon Sep 17 00:00:00 2001 From: Charlie Date: Wed, 28 Oct 2009 12:38:08 -0600 Subject: Initial commit --- pre-receive | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 pre-receive (limited to 'pre-receive') diff --git a/pre-receive b/pre-receive new file mode 100755 index 0000000..4232983 --- /dev/null +++ b/pre-receive @@ -0,0 +1,16 @@ +#!/bin/sh -eu +set -eu + +user=`id -un` + +# Check if user is allowed +match=`test -f git-receive-allow && grep -Fx "$user" git-receive-allow || true` +echo $match > /tmp/match.log +if [ -z "$match" ]; then + cat <&2 +--- +You're not allowed to push to this repository as $user. +--- +EOF + exit 1 +fi -- cgit v1.2.3