gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Ambigious doc on SSH Container Passthrough/Docker Shell

Open IamIpanda opened this issue 2 years ago • 0 comments

Description

On section Docker Shell, it set the fake gitea as:

/usr/bin/docker exec -i -u git --env SSH_ORIGINAL_COMMAND="$SSH_ORIGINAL_COMMAND" gitea sh "$@"

And origin authorized_keys is

command="/app/gitea/gitea --config='/data/gitea/conf/app.ini' serv key-1"

So that will combine to

+ /usr/bin/docker exec -i -u git --env SSH_ORIGINAL_COMMAND=xxxxx gitea sh --config=/data/gitea/conf/app.ini serv key-1

And get a sh: can't open 'serv': No such file or directory

Is that the fake gitea

/usr/bin/docker exec -i -u git --env SSH_ORIGINAL_COMMAND="$SSH_ORIGINAL_COMMAND" gitea sh "$@"

the sh should be $0?

Or, you can get it work by change authorized_keys or set AuthorizedKeysCommand, but that's not mentioned in that section.

Gitea Version

N/A

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

N/A

Screenshots

N/A

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker

Database

PostgreSQL

IamIpanda avatar Sep 17 '22 15:09 IamIpanda