summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.dockerignore5
-rw-r--r--README5
-rw-r--r--ci/build.yaml51
-rw-r--r--container/Dockerfile86
-rw-r--r--container/auth.conf10
-rw-r--r--container/cgitrc18
-rwxr-xr-xcontainer/create-repo55
-rwxr-xr-xcontainer/entrypoint.sh58
-rwxr-xr-xcontainer/git-host-key181
-rw-r--r--container/git-http-backend.cgi12
-rw-r--r--container/healthz1
-rw-r--r--container/lighttpd.conf43
-rw-r--r--container/sshd_config33
13 files changed, 13 insertions, 545 deletions
diff --git a/.dockerignore b/.dockerignore
deleted file mode 100644
index d269209..0000000
--- a/.dockerignore
+++ /dev/null
@@ -1,5 +0,0 @@
-# Build artifacts. An object file or a test binary built on the machine doing the building is the wrong libc for the image, and the failure it produces is "no such file" for a file that is plainly there.
-*.o
-obj/
-/git-authz
-/test/tmp/
diff --git a/README b/README
index eee46fa..75c3db2 100644
--- a/README
+++ b/README
@@ -155,6 +155,10 @@ Wiring
`$(SYSCONFDIR)/authz.conf` (leaving an existing one alone), and the symlink in
`$(HOOKDIR)/pre-receive`.
+This project builds the executable and installs it; the server that runs it -
+cgit, sshd, the web server, the container that assembles them around the
+installed binary - is configured in the git-host project, not here.
+
`validate` is what an entrypoint runs before it starts serving:
git-authz validate || exit 1
@@ -217,7 +221,6 @@ Layout
src/ the engine, as a library the command line adds nothing to
test/ one program per area, plus the behavioural suite
build/ helpers used while building and installing
- container/ the image: Dockerfile, entrypoint, server configuration
ci/ the pipeline
src/glob.c the pattern matching, such as it is
diff --git a/ci/build.yaml b/ci/build.yaml
index d881096..99e377d 100644
--- a/ci/build.yaml
+++ b/ci/build.yaml
@@ -5,14 +5,6 @@ resources:
uri: ssh://git@git.jnsn.dev:52502/~/git-host-c.git
branch: main
private_key: ((vbump.repo-key))
-- name: final-image
- type: registry-image
- icon: docker
- source:
- repository: registry.jnsn.dev/git-host-c
- username: ((vbump.username))
- password: ((vbump.password))
- tag: latest
jobs:
- name: update-pipeline
@@ -22,15 +14,16 @@ jobs:
- set_pipeline: self
file: repo/ci/build.yaml
-# The whole point of a C rewrite was to have one binary with no moving parts, so
-# the gate is: compile it under the strictest warnings the compiler has, run the
-# unit suite and the behavioural suite, and run both again under the sanitizers.
-# Alpine, because that is the libc the image is built against - a suite that
-# passes against glibc and segfaults on musl has told us nothing.
+# This project builds one thing: the access control executable. The gate is
+# therefore the program itself - compile it under the strictest warnings the
+# compiler has, run the unit suite and the behavioural suite, and run both again
+# under the sanitizers. Alpine, because that is the libc the host image (the
+# git-host project) builds this against - a suite that passes against glibc and
+# segfaults on musl has told us nothing.
#
-# The container suite (../git-host-integration) is deliberately not here: it
-# needs a container runtime inside the build, and a suite that fails because the
-# sandbox cannot mount an overlay is not a signal about the policy.
+# The container image and the container suite (../git-host-integration) live in
+# the git-host project now: this repo ships the program and its install, not the
+# server that runs it.
- name: test
plan:
- get: repo
@@ -60,29 +53,3 @@ jobs:
printf 'install: '
make install DESTDIR=/tmp/stage >/dev/null && \
readlink /tmp/stage/usr/local/share/git-host/hooks/pre-receive
-
-- name: build-container
- plan:
- - get: repo
- trigger: true
- passed: [test]
- privileged: true
- config:
- platform: linux
- image_resource:
- type: registry-image
- source:
- repository: concourse/oci-build-task
- inputs:
- - name: repo
- outputs:
- - name: image
- params:
- CONTEXT: repo
- DOCKERFILE: repo/container/Dockerfile
- UNPACK_ROOTFS: "true"
- run:
- path: build
- - put: final-image
- params:
- image: image/image.tar
diff --git a/container/Dockerfile b/container/Dockerfile
deleted file mode 100644
index 53b153e..0000000
--- a/container/Dockerfile
+++ /dev/null
@@ -1,86 +0,0 @@
-# podman build -t git-host-c -f container/Dockerfile .
-#
-# Two stages: the runtime image carries no compiler, and copies what `make
-# install` staged, so image paths cannot drift from build paths.
-#
-# The build stage is Alpine so the binary is musl-linked like the rest of the
-# image. A glibc binary reports "no such file" for a file that is plainly there.
-
-
-FROM alpine:3.22.4 AS build
-RUN apk add --no-cache build-base
-WORKDIR /src
-COPY Makefile README authz.conf ./
-COPY src ./src
-COPY cmd ./cmd
-COPY test ./test
-COPY build ./build
-# The suite runs against the musl build, which is the only place the two meet.
-
-RUN make -j2 && make test && make install DESTDIR=/install
-
-
-FROM alpine:3.22.4
-
-# git-daemon is not a typo: it is the package that ships git-http-backend and
-# git-shell.
-RUN apk add --no-cache \
- cgit \
- git \
- git-daemon \
- lighttpd \
- lighttpd-mod_auth \
- openssh-server \
- tini
-
-RUN addgroup -g 1000 -S git \
- && adduser -u 1000 -S -D -G git -h /var/lib/git -s /usr/bin/git-shell git \
- && adduser git tty \
- && passwd -u git \
- && mkdir -p \
- /etc/git-host/secrets \
- /usr/local/libexec \
- /var/lib/git \
- /run/git-host/secrets \
- /run/lighttpd \
- /run/sshd \
- /var/tmp/lighttpd \
- /var/www/localhost/htdocs \
- && chown -R git:git /var/lib/git
-
-# Placed by the program's own installer.
-
-COPY --from=build /install/ /
-
-COPY container/create-repo /usr/local/bin/create-repo
-COPY container/git-host-key /usr/local/bin/git-host-key
-COPY container/entrypoint.sh /usr/local/bin/entrypoint.sh
-
-# mod_cgi dispatches by extension, so /git needs a *.cgi door onto the stock
-# backend. It must not touch the environment: REMOTE_USER is the identity.
-
-COPY container/git-http-backend.cgi /usr/local/libexec/git-http-backend.cgi
-
-COPY container/sshd_config /etc/ssh/sshd_config
-COPY container/cgitrc /etc/cgitrc
-COPY container/lighttpd.conf /etc/lighttpd/lighttpd.conf
-COPY container/auth.conf /etc/lighttpd/auth.conf
-COPY container/healthz /var/www/localhost/htdocs/healthz
-
-RUN chmod 0755 \
- /usr/local/bin/entrypoint.sh \
- /usr/local/bin/git-host-key \
- /usr/local/bin/create-repo \
- /usr/local/libexec/git-http-backend.cgi \
- && chmod 0644 /etc/git-host/authz.conf \
- && chown git:git /var/lib/git /run/lighttpd /var/tmp/lighttpd /var/www/localhost/htdocs \
- && chmod 0755 /run/git-host /run/git-host/secrets \
- && git config --file /etc/gitconfig core.hooksPath /usr/local/share/git-host/hooks \
- && grep -q "^git:" /etc/passwd \
- && lighttpd -tt -f /etc/lighttpd/lighttpd.conf \
- && /usr/local/bin/git-authz validate
-
-EXPOSE 8080 2222
-VOLUME ["/var/lib/git"]
-
-ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/entrypoint.sh"]
diff --git a/container/auth.conf b/container/auth.conf
deleted file mode 100644
index 39c7550..0000000
--- a/container/auth.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-auth.backend = "htpasswd"
-auth.backend.htpasswd.userfile = "/run/git-host/secrets/htpasswd"
-
-$HTTP["querystring"] =~ "(^|&)service=git-receive-pack(&|$)" {
- auth.require = ("" => ("method" => "basic", "realm" => "Git Host", "require" => "valid-user"))
-}
-
-$HTTP["url"] =~ "^/git/.*/git-receive-pack$" {
- auth.require = ("" => ("method" => "basic", "realm" => "Git Host", "require" => "valid-user"))
-}
diff --git a/container/cgitrc b/container/cgitrc
deleted file mode 100644
index cd70b52..0000000
--- a/container/cgitrc
+++ /dev/null
@@ -1,18 +0,0 @@
-css=/cgit.css
-logo=/cgit.png
-favicon=/favicon.ico
-scan-path=/var/lib/git
-remove-suffix=1
-enable-http-clone=1
-snapshots=tar.gz zip
-root-title=Repositories
-root-desc=Simple Git host
-section-from-path=1
-clone-url=ssh://git@$HTTP_HOST:$CGIT_REPO_URL
-about-filter=/usr/lib/cgit/filters/about-formatting.sh
-enable-log-filecount=1
-enable-log-linecount=1
-enable-commit-graph=1
-max-stats=quarter
-virtual-root=/cgit/
-mimetype-file=/etc/mime.types
diff --git a/container/create-repo b/container/create-repo
deleted file mode 100755
index 5f80c92..0000000
--- a/container/create-repo
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-# Create a bare repository. Nothing is installed in it: every repository reaches
-# the shared hook through core.hooksPath, so one made by hand is enforced the same.
-#
-# The policy is a read-only mount, so this only prints the line to add.
-
-set -eu
-
-GIT_REPO_ROOT="${GIT_REPO_ROOT:-/var/lib/git}"
-GIT_USER="${GIT_USER:-git}"
-GIT_GROUP="${GIT_GROUP:-git}"
-DEFAULT_BRANCH="${GIT_HOST_DEFAULT_BRANCH:-main}"
-
-usage() {
- cat >&2 <<USAGE
-usage: create-repo <name> [description]
-
-Creates $GIT_REPO_ROOT/<name>.git - bare, owned by $GIT_USER, HEAD at
-refs/heads/$DEFAULT_BRANCH - and prints the policy line to add.
-USAGE
- exit 64
-}
-
-[ "$#" -ge 1 ] || usage
-
-name="$1"
-description="${2:-Unnamed repository}"
-
-case "${name}" in
- */* | .* | *" "* | *".."* )
- printf 'invalid repository name: %s\n' "${name}" >&2
- exit 64
- ;;
-esac
-
-case "${name}" in
- *.git) repo_name="${name}" ;;
- *) repo_name="${name}.git" ;;
-esac
-
-repo_path="${GIT_REPO_ROOT}/${repo_name}"
-
-if [ -e "${repo_path}" ]; then
- printf 'repository already exists: %s\n' "${repo_path}" >&2
- exit 1
-fi
-
-install -d -o "${GIT_USER}" -g "${GIT_GROUP}" "${repo_path}"
-git init --bare -b "${DEFAULT_BRANCH}" "${repo_path}" >/dev/null
-printf '%s\n' "${description}" >"${repo_path}/description"
-chown -R "${GIT_USER}:${GIT_GROUP}" "${repo_path}"
-
-printf 'created %s\n' "${repo_path}"
-printf 'policy line to add: <user> %s write refs/heads/*\n' "${name%.git}"
-printf ' (edit the policy source and roll the ConfigMap; nothing here writes it)'
diff --git a/container/entrypoint.sh b/container/entrypoint.sh
deleted file mode 100755
index df33b47..0000000
--- a/container/entrypoint.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-set -Eeuo pipefail
-
-SECRETS_SRC=/etc/git-host/secrets
-SECRETS_DIR=/run/git-host/secrets
-
-need_secret() { # <name> [mode] [owner-group]
- name="$1"; mode="${2:-0600}"; group="${3:-root}"
- if [ ! -r "$SECRETS_SRC/$name" ]; then
- printf 'entrypoint: missing secret %s\n' "$SECRETS_SRC/$name" >&2
- printf 'entrypoint: mount it there (a Kubernetes Secret works as-is)\n' >&2
- exit 1
- fi
- cp "$SECRETS_SRC/$name" "$SECRETS_DIR/$name"
- chown "root:$group" "$SECRETS_DIR/$name"
- 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
-need_secret ssh_host_ed25519_key
-need_secret ssh_host_ed25519_key.pub 0644
-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.
-
-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 &
-sshd_pid=$!
-
-lighttpd -D -f /etc/lighttpd/lighttpd.conf &
-lighttpd_pid=$!
-
-terminate() {
- kill "${sshd_pid}" "${lighttpd_pid}" 2>/dev/null || true
-}
-
-trap terminate INT TERM
-
-status=0
-wait -n "${sshd_pid}" "${lighttpd_pid}" || status=$?
-terminate
-wait "${sshd_pid}" 2>/dev/null || true
-wait "${lighttpd_pid}" 2>/dev/null || true
-exit "${status}"
diff --git a/container/git-host-key b/container/git-host-key
deleted file mode 100755
index 4c7c2dc..0000000
--- a/container/git-host-key
+++ /dev/null
@@ -1,181 +0,0 @@
-#!/bin/sh
-# ssh public keys that carry their own identity. sshd only knows the OS account,
-# which every user shares, so identity goes in the key's option list:
-#
-# command="/usr/bin/git-shell",...,environment="GIT_HOST_USER=alice"
-#
-# A key without it is anonymous to the policy and every push with it is denied.
-
-set -eu
-
-KEYS="${GIT_HOST_AUTHORIZED_KEYS:-/etc/git-host/secrets/authorized_keys}"
-RUNTIME_KEYS="${GIT_HOST_AUTHORIZED_KEYS_RUNTIME:-/run/git-host/secrets/authorized_keys}"
-SSH_SHELL="${GIT_HOST_SSH_SHELL:-/usr/bin/git-shell}"
-POLICY="${GIT_HOST_AUTHZ:-/etc/git-host/authz.conf}"
-KEY_TYPES='ssh-rsa ssh-dss ssh-ed25519 ssh-ed448 ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521 sk-ssh-ed25519@openssh.com sk-ecdsa-sha2-nistp256@openssh.com'
-
-usage() {
- cat <<'USAGE'
-git-host-key - manage ssh keys and the user identity attached to them
-
-Usage:
- git-host-key add <user> [keyfile|-] add key(s) owned by <user> (default: stdin)
- git-host-key list user, fingerprint and comment per key
- git-host-key rm <user> remove every key of <user>
-
-Each key is written with the option prefix above, so a push made with one arrives
-named rather than anonymous. Nothing re-checks that afterwards: a key edited in
-by hand can lose the identity option, and the name a key carries still needs a
-rule in the policy file.
-
-Files:
- GIT_HOST_AUTHORIZED_KEYS authoritative file (default /etc/git-host/secrets/authorized_keys)
- GIT_HOST_AUTHORIZED_KEYS_RUNTIME file sshd reads (default /run/git-host/secrets/authorized_keys)
-
-After editing, the runtime copy is refreshed and sshd picks it up on the next
-connection (no reload needed). A key only names somebody; what they may do comes
-from the policy file, which is a read-only mount in a deployed container: edit
-your source copy and roll the ConfigMap that provides it.
-USAGE
-}
-
-key_options() {
- printf 'command="%s",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-user-rc,environment="GIT_HOST_USER=%s"' "$SSH_SHELL" "$1"
-}
-
-identity_of() {
- printf '%s' "$1" | sed -n 's/.*GIT_HOST_USER=\([^",[:space:]]*\).*/\1/p'
-}
-
-# strip any pre-existing option list, returning "<type> <base64> [comment]"
-strip_options() {
- printf '%s\n' "$1" | awk -v types="$KEY_TYPES" '
- BEGIN { n = split(types, t, " "); for (i = 1; i <= n; i++) is[t[i]] = 1 }
- {
- for (i = 1; i <= NF; i++) {
- if (is[$i]) {
- out = ""
- for (j = i; j <= NF; j++) out = out (j > i ? " " : "") $j
- print out
- found = 1
- exit
- }
- }
- }
- END { if (!found) exit 1 }'
-}
-
-valid_key_line() {
- _body="$(strip_options "$1")" || return 1
- _tmp="$(mktemp)"
- printf '%s\n' "$_body" >"$_tmp"
- if command -v ssh-keygen >/dev/null 2>&1; then
- ssh-keygen -l -f "$_tmp" >/dev/null 2>&1 || { rm -f "$_tmp"; return 1; }
- fi
- rm -f "$_tmp"
- return 0
-}
-
-fingerprint_of() {
- _body="$(strip_options "$1")" || return 1
- _tmp="$(mktemp)"
- printf '%s\n' "$_body" >"$_tmp"
- if command -v ssh-keygen >/dev/null 2>&1; then
- ssh-keygen -l -f "$_tmp" 2>/dev/null | awk '{print $2}'
- else
- printf 'unknown\n'
- fi
- rm -f "$_tmp"
-}
-
-sync_runtime() {
- [ -f "$KEYS" ] || return 0
- if [ ! -d "$(dirname "$RUNTIME_KEYS")" ]; then return 0; fi
- if install -m 0640 "$KEYS" "$RUNTIME_KEYS.tmp" 2>/dev/null; then
- mv -f "$RUNTIME_KEYS.tmp" "$RUNTIME_KEYS" 2>/dev/null || rm -f "$RUNTIME_KEYS.tmp"
- else
- printf 'git-host-key: warning: could not refresh %s (run as root and re-run, or restart the container)\n' "$RUNTIME_KEYS" >&2
- fi
-}
-
-write_keys() {
- _tmp="$(mktemp)"
- printf '%s\n' "$1" >"$_tmp"
- install -m 0600 "$_tmp" "$KEYS" || { rm -f "$_tmp"; exit 1; }
- rm -f "$_tmp"
- sync_runtime
-}
-
-cmd_add() {
- [ "$#" -ge 1 ] || { usage; exit 64; }
- user="$1"
- src="${2:--}"
- case "$user" in
- ''|*[!A-Za-z0-9._@-]*) printf 'git-host-key: invalid user name: %s\n' "$user" >&2; exit 64 ;;
- esac
- [ -e "$KEYS" ] || { mkdir -p "$(dirname "$KEYS")"; : >"$KEYS"; }
-
- _added=0
- _out="$(cat "$KEYS")"
- while IFS= read -r line; do
- case "$line" in ''|\#*) continue ;; esac
- if ! valid_key_line "$line"; then
- printf 'git-host-key: skipping unparseable key: %s\n' "$(printf '%s' "$line" | cut -c1-60)" >&2
- continue
- fi
- body="$(strip_options "$line")"
- _out="${_out:+$_out
-}$(key_options "$user") $body"
- _added=$((_added + 1))
- done <"$src"
-
- [ "$_added" -gt 0 ] || { printf 'git-host-key: no usable key found in %s\n' "$src" >&2; exit 1; }
- write_keys "$_out"
- printf 'git-host-key: added %s key(s) for %s\n' "$_added" "$user"
- if ! grep -Eq "^[[:space:]]*${user}[[:space:]]" "$POLICY" 2>/dev/null; then
- printf 'git-host-key: note: %s has no policy rule yet, so their pushes will be denied.\n' "$user" >&2
- printf 'git-host-key: add "%s <repo> write <ref pattern>" to the policy source.\n' "$user" >&2
- fi
-}
-
-cmd_list() {
- [ -f "$KEYS" ] || return 0
- _n=0
- while IFS= read -r line; do
- case "$line" in ''|\#*) continue ;; esac
- _n=$((_n + 1))
- _u="$(identity_of "$line")"
- [ -n "$_u" ] || _u='<no identity>'
- printf '%s\t%s\t%s\n' "$_u" "$(fingerprint_of "$line")" "$(printf '%s' "$line" | awk '{print $NF}')"
- done <"$KEYS"
- [ "$_n" -gt 0 ] || printf 'git-host-key: no keys in %s\n' "$KEYS" >&2
-}
-
-cmd_rm() {
- [ "$#" -ge 1 ] || { usage; exit 64; }
- user="$1"
- [ -f "$KEYS" ] || exit 0
- _new=''
- _removed=0
- while IFS= read -r line; do
- case "$line" in ''|\#*) continue ;; esac
- if [ "$(identity_of "$line")" = "$user" ]; then
- _removed=$((_removed + 1))
- continue
- fi
- _new="${_new:+$_new
-}$line"
- done <"$KEYS"
- write_keys "${_new:+$_new
-}"
- printf 'git-host-key: removed %s key(s) of %s\n' "$_removed" "$user"
-}
-
-cmd="${1:-}"; shift || true
-case "$cmd" in
- add) cmd_add "$@" ;;
- list) cmd_list "$@" ;;
- rm) cmd_rm "$@" ;;
- -h|--help|'') usage ;;
- *) printf 'git-host-key: unknown command: %s\n' "$cmd" >&2; usage >&2; exit 64 ;;
-esac
diff --git a/container/git-http-backend.cgi b/container/git-http-backend.cgi
deleted file mode 100644
index c69758b..0000000
--- a/container/git-http-backend.cgi
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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"
diff --git a/container/healthz b/container/healthz
deleted file mode 100644
index 9766475..0000000
--- a/container/healthz
+++ /dev/null
@@ -1 +0,0 @@
-ok
diff --git a/container/lighttpd.conf b/container/lighttpd.conf
deleted file mode 100644
index cd9d562..0000000
--- a/container/lighttpd.conf
+++ /dev/null
@@ -1,43 +0,0 @@
-server.modules = (
- "mod_alias",
- "mod_auth",
- "mod_authn_file",
- "mod_cgi",
- "mod_rewrite",
- "mod_setenv"
-)
-
-server.bind = "0.0.0.0"
-server.port = 8080
-server.username = "git"
-server.groupname = "git"
-server.document-root = "/var/www/localhost/htdocs"
-server.pid-file = "/run/lighttpd/lighttpd.pid"
-
-index-file.names = ("index.html")
-
-alias.url = (
- "/cgit.cgi" => "/usr/share/webapps/cgit/cgit.cgi",
- "/cgit.css" => "/usr/share/webapps/cgit/cgit.css",
- "/cgit.png" => "/usr/share/webapps/cgit/cgit.png",
- "/cgit" => "/usr/share/webapps/cgit/cgit.cgi",
- "/favicon.ico" => "/usr/share/webapps/cgit/favicon.ico",
- "/robots.txt" => "/usr/share/webapps/cgit/robots.txt",
- "/git" => "/usr/local/libexec/git-http-backend.cgi"
-)
-
-url.rewrite-once = (
- "^/$" => "/cgit"
-)
-
-cgi.assign = (
- ".cgi" => ""
-)
-
-setenv.add-environment = (
- "CGIT_CONFIG" => "/etc/cgitrc",
- "GIT_PROJECT_ROOT" => "/var/lib/git",
- "GIT_HTTP_EXPORT_ALL" => "1"
-)
-
-include "/etc/lighttpd/auth.conf"
diff --git a/container/sshd_config b/container/sshd_config
deleted file mode 100644
index fca7e7b..0000000
--- a/container/sshd_config
+++ /dev/null
@@ -1,33 +0,0 @@
-Port 2222
-ListenAddress 0.0.0.0
-HostKey /run/git-host/secrets/ssh_host_ed25519_key
-HostKey /run/git-host/secrets/ssh_host_rsa_key
-PidFile /run/sshd/sshd.pid
-
-# One OS account for everyone; the name behind a key comes from the key itself:
-#
-# environment="GIT_HOST_USER=alice",command="/usr/bin/git-shell",... ssh-ed25519 ...
-
-AuthorizedKeysFile /run/git-host/secrets/authorized_keys
-
-# Without this sshd silently drops the environment= option and every push arrives
-# anonymous. The usual objection does not apply: there is no login shell here
-# (ForceCommand below), no writable files and no user rc file.
-
-PermitUserEnvironment yes
-
-# For a hand-added key that forgot its command= option: git transport, no shell.
-
-ForceCommand /usr/bin/git-shell
-
-PasswordAuthentication no
-KbdInteractiveAuthentication no
-ChallengeResponseAuthentication no
-PermitRootLogin no
-PermitTunnel no
-AllowTcpForwarding no
-X11Forwarding no
-PermitTTY no
-PrintMotd no
-AllowUsers git
-Subsystem sftp internal-sftp