aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/doc
diff options
context:
space:
mode:
authorMashiro <moezhx@outlook.com>2021-10-19 00:26:47 +0800
committerGitHub <noreply@github.com>2021-10-18 12:26:47 -0400
commitf0376b7e020f0e7a790e4ee801db17f1f4bcd994 (patch)
treee5b3aa73b1ea813b0f5a8f47280d56194c48dd18 /docs/content/doc
parent3397fee9fa43b8838804c1a703658afc2eb86462 (diff)
downloadgitea-f0376b7e020f0e7a790e4ee801db17f1f4bcd994.tar.gz
gitea-f0376b7e020f0e7a790e4ee801db17f1f4bcd994.zip
docs: add permission notes to `SSH Container Passthrough` (#17347)
* Update with-docker.en-us.md * Update with-docker.en-us.md Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'docs/content/doc')
-rw-r--r--docs/content/doc/installation/with-docker.en-us.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/content/doc/installation/with-docker.en-us.md b/docs/content/doc/installation/with-docker.en-us.md
index 3c51852fba..7491ef37de 100644
--- a/docs/content/doc/installation/with-docker.en-us.md
+++ b/docs/content/doc/installation/with-docker.en-us.md
@@ -333,9 +333,16 @@ 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 should also make sure that you've 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