Skip to content

Commit f0376b7

Browse files
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 <[email protected]>
1 parent 3397fee commit f0376b7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/content/doc/installation/with-docker.en-us.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,16 @@ sudo -u git ssh-keygen -t rsa -b 4096 -C "Gitea Host Key"
333333
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`:
334334

335335
```bash
336+
#!/bin/sh
336337
ssh -p 2222 -o StrictHostKeyChecking=no [email protected] "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
337338
```
338339

340+
Here you should also make sure that you've set the permisson of `/app/gitea/gitea` correctly:
341+
342+
```bash
343+
sudo chmod +x /app/gitea/gitea
344+
```
345+
339346
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:
340347

341348
```bash

0 commit comments

Comments
 (0)