summaryrefslogblamecommitdiffstats
path: root/gitolite/entrypoint.sh
blob: 613a9684ea04be98f1d195465636b042f56a3124 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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