-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Labels
type/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.
Description
Description
Add an option to modify, what is written to the authorized_keys, so gitea can be used with the same key, which is also used for accessing the server.
An example for such a modification is this
command="if [ -t 0 ]; then bash; elif [[ $SSH_ORIGINAL_COMMAND =~ ^(scp|rsync|mysqldump).* ]]; then eval $SSH_ORIGINAL_COMMAND; else /home/<username>/gitea/gitea serv key-1 --config='/home/<username>/gitea/custom/conf/app.ini'; fi",no-port-forwarding,no-X11-forwarding,no-agent-forwarding ssh-...
this is useful for shared hosting scenarios like the guide by @luto, where i copied this line from.
I would imagine an option
SSH_RESTRICT: %(giteacmd)s
and used like this
SSH_RESTRICT: if [ -t 0 ]; then bash; elif [[ $SSH_ORIGINAL_COMMAND =~ ^(scp|rsync|mysqldump).* ]]; then eval $SSH_ORIGINAL_COMMAND; else %(giteacmd)s ; fi",no-port-forwarding,no-X11-forwarding,no-agent-forwarding
for shared hosting, generating a line as describe above
Metadata
Metadata
Assignees
Labels
type/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.