summaryrefslogtreecommitdiffstats
path: root/entrypoint.sh
diff options
context:
space:
mode:
authorJesper Jensen <jesper@jnsn.dev>2026-11-15 16:00:42 +0100
committerJesper Jensen <jesper@jnsn.dev>2026-11-15 16:00:42 +0100
commitbb35e1e366fa1d0680866be26a28eadecba74c3b (patch)
tree04417d35a326181198fd8ec6be33f339a0bdd9ab /entrypoint.sh
parented62c4ccf06c2c85d871a6334e3e0d82c6e4257a (diff)
downloadgit-host-bb35e1e366fa1d0680866be26a28eadecba74c3b.tar.gz
git-host-bb35e1e366fa1d0680866be26a28eadecba74c3b.zip
Cleanup from the AI slop
Diffstat (limited to 'entrypoint.sh')
-rw-r--r--entrypoint.sh11
1 files changed, 1 insertions, 10 deletions
diff --git a/entrypoint.sh b/entrypoint.sh
index df33b47..fbe2502 100644
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -16,9 +16,6 @@ need_secret() { # <name> [mode] [owner-group]
chmod "$mode" "$SECRETS_DIR/$name"
}
-# Mounted secrets arrive with whatever mode the volume plugin chose. sshd refuses
-# keys that are too loose; lighttpd must read htpasswd as the git user.
-
mkdir -p "$SECRETS_DIR"
need_secret authorized_keys 0640 git
need_secret htpasswd 0640 git
@@ -28,14 +25,8 @@ need_secret ssh_host_rsa_key
need_secret ssh_host_rsa_key.pub 0644
chmod 0755 /run/git-host "$SECRETS_DIR"
-# The single most important line in the container: without it a repository carries
-# no policy and pushes go unchecked. The policy is never copied, so a ConfigMap
-# update takes effect on the next push.
-
+# Set a git hook for authorization
git config --file /etc/gitconfig core.hooksPath "${GIT_HOST_HOOK_DIR:-/usr/local/share/git-host/hooks}"
-
-# Do not serve a host that cannot enforce anything.
-
git-authz validate
/usr/sbin/sshd -D -e -f /etc/ssh/sshd_config &