fix: git docker shim
This commit is contained in:
parent
8d45311e0d
commit
ce0042117c
4 changed files with 3 additions and 2 deletions
|
@ -4,4 +4,5 @@ if ! getent passwd git &>/dev/null; then
|
||||||
echo "creating git user..."
|
echo "creating git user..."
|
||||||
useradd -m git
|
useradd -m git
|
||||||
usermod git -aG docker
|
usermod git -aG docker
|
||||||
|
chsh -s /home/git/docker-shell git
|
||||||
fi
|
fi
|
|
@ -1,3 +1,3 @@
|
||||||
Match User git
|
Match User git
|
||||||
AuthorizedKeysCommandUser git
|
AuthorizedKeysCommandUser git
|
||||||
AuthorizedKeysCommand /usr/bin/docker exec -i git /usr/local/bin/gitea keys -c /data/gitea/conf/app.ini -e git -u %u -t %t -k %k
|
AuthorizedKeysCommand /usr/bin/docker exec -iu git git /usr/local/bin/gitea keys -c /data/gitea/conf/app.ini -e git -u %u -t %t -k %k
|
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
/usr/bin/docker exec -i --env SSH_ORIGINAL_COMMAND="$SSH_ORIGINAL_COMMAND" gitea sh "$@"
|
/usr/bin/docker exec -iu git --env SSH_ORIGINAL_COMMAND="$SSH_ORIGINAL_COMMAND" git sh "$@"
|
Loading…
Reference in a new issue