Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add permission notes to SSH Container Passthrough #17347

Merged
merged 3 commits into from
Oct 18, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/content/doc/installation/with-docker.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you help to add a shebang line #!/bin/sh here? In case some users are using non-sh shells.

```

Here you may also need to set the permisson of `/app/gitea/gitea` correctly:

```bash
sudo chmod +x /app/gitea/gitea
```

Copy link
Contributor

@wxiaoguang wxiaoguang Oct 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can not understand why we need this step. If the gitea binary doesn't have +x, how can it be started before?

Oh I can see your point ~~ . Then the text should be you should set instead of you may 😊

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
Expand Down