Uberspace / lab

The Uberlab provides various tutorials - written by you! - on how to run software and tools on Uberspace 7.
https://lab.uberspace.de
Other
315 stars 414 forks source link

[gitea] Emphasize breaking parameters for optional ssh setup #1578

Closed cmacht closed 10 months ago

cmacht commented 1 year ago

I updated gitea to 1.20.3 and added new SSH keys. I used the optional ssh setup for using the same key for gitea and shell access but failed to notice that I need to delete a few parameters. Compare:

command="if [ -t 0 ]; then bash; elif [[ ${SSH_ORIGINAL_COMMAND} =~ ^(scp|rsync|mysqldump).* ]]; then eval ${SSH_ORIGINAL_COMMAND}; else /home/isabell/gitea/gitea serv key-1 --config='/home/isabell/gitea/custom/conf/app.ini'; fi",no-port-forwarding,no-X11-forwarding,no-agent-forwarding ssh-ed25519 ... user@host

vs.

command="if [ -t 0 ]; then bash; elif [[ ${SSH_ORIGINAL_COMMAND} =~ ^(scp|rsync|mysqldump).* ]]; then eval ${SSH_ORIGINAL_COMMAND}; else /home/isabell/gitea/gitea serv key-1 --config='/home/isabell/gitea/custom/conf/app.ini'; fi",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,no-user-rc,restrict ssh-ed25519 ... user@host

The latter will not work, apparently because of no-pty,no-user-rc,restrict. The guide already does not include these, but as I was typing instead of copy&paste, I did miss it initially. Possibly, these were also added in the new version?

Please close this issue, if this is a non-problem (as I said, guide is correct). Otherwise, I would find it helpful to mention the need to omit these parameters and could provide a pull request.