From c1db5d6e6557ac5f3b9d408eb2de888bf096a370 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Fri, 15 Sep 2023 08:49:25 -0400 Subject: gitolite: Add admin initialization script Per docker image changes, this serves as an alternative entrypoint for performing initial pubkey configuration. Signed-off-by: Malfurious --- gitolite/initialize.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 gitolite/initialize.sh (limited to 'gitolite/initialize.sh') diff --git a/gitolite/initialize.sh b/gitolite/initialize.sh new file mode 100755 index 0000000..6806acd --- /dev/null +++ b/gitolite/initialize.sh @@ -0,0 +1,16 @@ +#!/bin/bash -e + +# This script is manually invoked when first setting up a site to initialize the +# gitolite repositories database and set up a user-supplied pubkey for initial +# administrator access. + +echo -e "This will erase data in the gitolite repository volume!" +echo -e "One SSH pubkey will be used as the initial administrator of the new install." +echo -e "\nKey selected: $1" +cat "/tmp/$1" +echo -e "\nPress Enter/Return to continue..." + +read -r confirm + +rm -rf /git/.gitolite /git/repositories/* +su git -c "gitolite setup -pk /tmp/$1" -- cgit v1.2.3