Hi, how do you run forgejo under a reverse proxy while using an ssh channel to pull/push commits?
From what I understand caddy is only able to proxy http traffic.
Hi, how do you run forgejo under a reverse proxy while using an ssh channel to pull/push commits?
From what I understand caddy is only able to proxy http traffic.
There are a few ways to do it, but you don’t use caddy for SSH.
Last option is how I run my Gitea instance, authorized keys is managed by gitea so you don’t really need to do anything high maintenance.
~git/.ssh/authorized_keys:
command="/usr/local/bin/gitea --config=/data/gitea/conf/app.ini serv key-9",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,no-user-rc,restrict ssh-rsa PUBLICKEYHASH
/usr/local/bin/gitea:
ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.14 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
127.0.0.14 is the local git docker access where I expose the service, but you couldn’t different ports, IPS, etc.