mirror of
https://github.com/nicolabs/git-server-docker.git
synced 2026-04-12 00:58:32 +02:00
16 lines
346 B
Bash
16 lines
346 B
Bash
#!/bin/sh
|
|
|
|
cd /home/git
|
|
|
|
# If there is some public key in keys folder
|
|
# then it copies its contain in authorized_keys file
|
|
if [ "$(ls -A /git-server/keys/)" ]; then
|
|
cat /git-server/keys/*.pub > .ssh/authorized_keys
|
|
chown -R git:git .ssh
|
|
chmod 700 .ssh
|
|
chmod -R 600 .ssh/*
|
|
fi
|
|
|
|
# -D flag avoids executing sshd as a daemon
|
|
/usr/sbin/sshd -D
|