Change the command for gitea passthrough

This commit is contained in:
Chris
2022-10-05 22:40:58 +00:00
parent 49d4606e8e
commit d6688d2d68

View File

@@ -45,11 +45,11 @@ systemctl restart sshd
echo "------- Enabling SSH passthrough -------" echo "------- Enabling SSH passthrough -------"
# Make files necessary for SSH passthrough (https://docs.gitea.io/en-us/install-with-docker/#ssh-container-passthrough) # Make files necessary for SSH passthrough (https://docs.gitea.io/en-us/install-with-docker/#ssh-container-passthrough)
mkdir -p /var/lib/gitea mkdir -p /var/lib/gitea
mkdir -p /app/gitea cat <<"EOF" | sudo tee /usr/local/bin/gitea
tee /app/gitea/gitea <<END
#!/bin/sh #!/bin/sh
ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\\"\$SSH_ORIGINAL_COMMAND\\" \$0 \$@" ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
END EOF
sudo chmod +x /usr/local/bin/gitea
chmod +x /app/gitea/gitea chmod +x /app/gitea/gitea