summaryrefslogtreecommitdiffstats
path: root/gitolite/entrypoint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'gitolite/entrypoint.sh')
-rwxr-xr-xgitolite/entrypoint.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/gitolite/entrypoint.sh b/gitolite/entrypoint.sh
new file mode 100755
index 0000000..613a968
--- /dev/null
+++ b/gitolite/entrypoint.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# On startup of the gitolite container, force a receive of the gitolite-admin
+# files from the persistent volume, to cause the user's real pubkeys and config
+# files to take effect.
+main() {
+ sleep 5
+ ssh -o StrictHostKeyChecking=accept-new git@localhost info # cache hostkey
+ git clone --bare git@localhost:gitolite-admin.git /tmp/gladmin.git
+ git --git-dir=/tmp/gladmin.git push origin :master # remove rmt master
+ git --git-dir=/tmp/gladmin.git push origin master # replace rmt master
+}
+
+main &
+/usr/sbin/sshd -D