Closed
Description
- Gitea version (or commit ref):
v1.14.1
- Git version:
2.26.3
- Operating system:
Linux pi 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Log gist:
ssh git@...
PTY allocation request failed
bash: /app/gitea/gitea: Datei oder Verzeichnis nicht gefunden
Shared connection to ... closed.
Description
I'm running a Gitea instance inside a Docker container. While the SSH connection works in general, the passthrough as described in the docs does not work, because the file /app/gitea/gitea
does not exist on the host. As I don't want to create that path on the host, I'd like to specify an alternative path to the script with the content described in the docs, e.g. /home/git/handle-gitea-ssh.sh
.
A new environment variable would probably be suited for this, for example:
[server]
SSH_AUTHORIZED_KEYS_HANDLER=/home/git/handle-gitea-ssh.sh
The changes in the code would probably have to be made here:
Lines 89 to 92 in e7fc078
The result should look like this:
- command="/app/gitea/gitea --config=/data/gitea/conf/app.ini serv key-2" ...
+ command="/home/git/handle-gitea-ssh.sh --config=/data/gitea/conf/app.ini serv key-2" ...
I'd probably open a PR by myself, but I don't know any Go 😄