SSH something is broken and it's a real shame

Hi,

Having followed various sets of instructions to install a containerised gitea and postgres setup I cannot get ssh access to work.

There is a load of perhaps, maybe type commentary on this, but it doesn’t help.

I cannot clone a repo, I am asked for a password for a user which is not a password I have - the git user. I have added my ssh key to the UI and verified it. there is one system user and that user is the admin. surely I do not need to edit the container internally to get ssh working ?

Gitea looks perfect for my use case, but no working SSH is not something I can live with.

What am I missing and is there a definative set of correct instructions which I can follow to get this working - many people seem to have similar but perhaps not identical problems.

running on docker on ubuntu 26, everyting else apart from ssh works.

Please have some debug info to run ssh -vvv

How did you set up ssh and what was exact docker command? You need to tell docker to forward internal ssh port 22 to external port, which should probably be something else than your host’s ssh server. Then you can edit app.ini to specify the external ssh port that should be advertised. If you have any port conflicts you will get either no connection or connection to host ssh server - symptom is that it will ask you for password, even though ssh public key was specified in settings page

I’ve used gitea installation procedures and used the standard docker compose files supplied.

SSH works, as such, but when I take the REPO URL and try to use it to clone over SSH I am asked for the git user password, I don’t know this password, I never created the git user.

Something, somewhere, within the container ssh configuration is broken, and it was not me that broke it.

Having to hack the container config is not scalable.

IMHO the container compose scripts should create a container config that works, out of the box, for SSH connected users. It doesn’t. Look at the number of people that cannot get SSH to work.

This could be a port conflict on the host, but why is this not covered. Perhaps y’all should be using container host mode networking, which would solve that problem.