summaryrefslogtreecommitdiff
path: root/hooks/post-receive
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/post-receive')
-rwxr-xr-xhooks/post-receive33
1 files changed, 0 insertions, 33 deletions
diff --git a/hooks/post-receive b/hooks/post-receive
index 74fe96b..72dc81d 100755
--- a/hooks/post-receive
+++ b/hooks/post-receive
@@ -15,38 +15,5 @@ warn()
15 fi 15 fi
16} 16}
17 17
18GET_NOMIC_USER()
19{
20 if [ "$NOMIC_USER" ]
21 then
22 return
23 elif [ "$SSH_USER_AUTH" ] && [ -f "$SSH_USER_AUTH" ]
24 then
25 read authtype keytype keyval < "$SSH_USER_AUTH"
26 [ "$authtype" = publickey ] || exit
27
28 for keyname in authorized_keys.d/*
29 do
30 while read a b _
31 do
32 case "$a $b" in
33 "$keytype $keyval")
34 NOMIC_USER=${keyname#authorized_keys.d/}
35 break
36 ;;
37 esac
38 done < "$keyname"
39 done
40 true
41 else
42 warn "\$SSH_USER_AUTH missing. Try putting 'ExposeAuthInfo yes' in /etc/ssh/sshd_config"
43 false
44 fi
45}
46
47GIT_WORK_TREE=. git checkout -f master -- authorized_keys.d/\* 18GIT_WORK_TREE=. git checkout -f master -- authorized_keys.d/\*
48 19
49if GET_NOMIC_USER
50then
51 warn "NOMIC_USER=$NOMIC_USER"
52fi