I have not time and hurry, and have made a decision to get the simplest possible way - run SSH alongside with Gitea container. Generally, it’s wrong - SSH must be separated container. But it’s not so bad as to forward host SSH - we need some virtualization due to security and reliability concerns.
I was able to do the same thing simply doing a port mapping in captain rover from 22 to 22, which allowed me to setup remote deploys, but I wouldn’t have thought of that without this post.
I’m running Gitea via Yunohost on a subdomain, so the SSH URIs on my repos were showing as ssh://gitea@gitea.mydomain.com:2222/Org/RepoName.git instead of ssh://gitea@mydomain.com:2222/Org/RepoName.git. (It took me ages to figure out why I couldn’t access my repos through SSH!)
Setting SSH_DOMAIN in /opt/gitea/custom/conf/app.ini set the URIs shown in the webapp to the correct domain.
I want to achieve the exact opposite thing. I am running a dockerized gitea container. How to configure the app.ini file to achieve git@domain.com:username/demoproject.git?