From 0208b7ec0f82e371c19ccb26942f6ab65431daa7 Mon Sep 17 00:00:00 2001 From: Mashiro Date: Mon, 18 Oct 2021 11:47:18 +0800 Subject: [PATCH 1/2] Update with-docker.en-us.md --- docs/content/doc/installation/with-docker.en-us.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/content/doc/installation/with-docker.en-us.md b/docs/content/doc/installation/with-docker.en-us.md index 3c51852fba984..6d8fb17403bd7 100644 --- a/docs/content/doc/installation/with-docker.en-us.md +++ b/docs/content/doc/installation/with-docker.en-us.md @@ -336,6 +336,12 @@ In the next step a file named `/app/gitea/gitea` (with executable permissions) n ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@" ``` +Here you may also need to set the permisson of `/app/gitea/gitea` correctly: + +```bash +sudo chmod +x /app/gitea/gitea +``` + To make the forwarding work, the SSH port of the container (22) needs to be mapped to the host port 2222 in `docker-compose.yml` . Since this port does not need to be exposed to the outside world, it can be mapped to the `localhost` of the host machine: ```bash From 5d1f15b0fcfe5075d3ab90f73cde9661266d3edf Mon Sep 17 00:00:00 2001 From: Mashiro Date: Mon, 18 Oct 2021 16:11:09 +0800 Subject: [PATCH 2/2] Update with-docker.en-us.md --- docs/content/doc/installation/with-docker.en-us.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/content/doc/installation/with-docker.en-us.md b/docs/content/doc/installation/with-docker.en-us.md index 6d8fb17403bd7..7491ef37de958 100644 --- a/docs/content/doc/installation/with-docker.en-us.md +++ b/docs/content/doc/installation/with-docker.en-us.md @@ -333,10 +333,11 @@ sudo -u git ssh-keygen -t rsa -b 4096 -C "Gitea Host Key" In the next step a file named `/app/gitea/gitea` (with executable permissions) needs to be created on the host. This file will issue the SSH forwarding from the host to the container. Add the following contents to `/app/gitea/gitea`: ```bash +#!/bin/sh ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@" ``` -Here you may also need to set the permisson of `/app/gitea/gitea` correctly: +Here you should also make sure that you've set the permisson of `/app/gitea/gitea` correctly: ```bash sudo chmod +x /app/gitea/gitea