tAdd contrib files. - git-restrict - simple utility for git repo permission management HTML git clone https://git.parazyd.org/git-restrict DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit 2cdc1aaee457c45e8943c80f9a5ab7fa17e5da77 DIR parent d11979654e183e95b46501dba3c364c187db5397 HTML Author: parazyd <parazyd@dyne.org> Date: Wed, 31 Mar 2021 03:35:08 +0200 Add contrib files. Diffstat: A contrib/gen_rules.sh | 16 ++++++++++++++++ A contrib/keys/user0 | 2 ++ A contrib/keys/user1 | 1 + 3 files changed, 19 insertions(+), 0 deletions(-) --- DIR diff --git a/contrib/gen_rules.sh b/contrib/gen_rules.sh t@@ -0,0 +1,16 @@ +#!/bin/sh + +misc="no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty" + +gen_for_keys() { + while read -r key; do + printf "command=\"/usr/bin/git-restrict %s\",%s %s\n" "$@" "$misc" "$key" + done +} + +# Admin, let's say they don't need "command" guards. +cat keys/user0 + +# Users which we want to cap repos for. +repos_user1="some-repository another-repo" +gen_for_keys "$repos_user1" < keys/user1 DIR diff --git a/contrib/keys/user0 b/contrib/keys/user0 t@@ -0,0 +1,2 @@ +ssh-ed25519 AAAA...0N user0@somemachine +ssh-ed25519 AAAA...PI user0@anothermachine DIR diff --git a/contrib/keys/user1 b/contrib/keys/user1 t@@ -0,0 +1 @@ +ssh-ed25519 AAAA...foo user1@foo