Cannot setup ssh

I’m using gitea on a docker instalation, with a reverse proxy (nginx proxy manager) and self signed SSL and all is working… but only in https.

I also a stream on npm to redirect port 22 to conainer ip’s port 2221.

I started to install following the guides, but it simply does not work.
On the container side i mapped to port 2221
UID is 1000
On the host i created the user git also with uid 1000, all following the gitea guide.

When i use https all works, but if i try to git clone ssh a repo for example:
git clone git@gitea.home.server:proldan/teamcity.git

Result:
Cloning into ‘teamcity’…
git@gitea.home.server’s password:

Never accepts nothing and gives: Permission denied, please try again.

Can someone please plase give me a step by step tuturial for the best or correct way to setup ssh in my docker gitea instalation?

This is the guide i used: Installation with Docker | Gitea Documentation

Hi ,

do you tried to use the ssh prefix?

“git clone ssh://git@gitea.home.server:%YOURSSHPORT%/proldan/teamcity.git”

OMG first time it works :slight_smile:

But…

how do I add the ssh:// to the repo ssh link? that’s one problem

and, on my nginkx proxy manager I have gitea.home.server directed to IP:8080 of the gitea server, and that’s probably why I cant really use ssh://gitea.home.server:2221/xxxxxxxx, if I use ssh://gitea server IP:2221/xxx it works, how could I change this to work with ssh://git@gitea.home.server/xxx ?

Hi again

I figured out that changing the
SSH_PORT = 2221
SSH_LISTEN_PORT = 2221

Will change the ssh link in the repo but now I cannot git clone anymore,
if I place
SSH_PORT = 22
SSH_LISTEN_PORT = 2221

Then I can git clone but the link in the ssh repo is changed back, what am I doing wrong?

btw when I change to
SSH_PORT = 2221
SSH_LISTEN_PORT = 2221

I also change the mapping of the container to 2221:2221

If you want to use the default ssh Port change SSH_Port to 22 in app.ini and then use docker portmapping 22:2221