-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gitea starts SSH server on incorrect port #8453
Comments
Hi! I can't see any change that could be a reason for this. The SSH host is opened on Line 112 in df2c11a
Which is defined as: gitea/modules/setting/setting.go Line 649 in df2c11a
Which assuming you're running the s6 setup gets set here: gitea/docker/root/etc/s6/gitea/setup Line 34 in df2c11a
So either you're running a version of gitea that doesn't have this i.e. <1.10 or your docker isn't running the setup properly. Take a look at your /etc/s6/gitea/setup file and ensure that you're on 1.10-dev not 1.9.x |
A somewhat related note: Gitea likely can't listen on port 22 (although opensshd in the container can) in the docker container due to it not having root capabilities. |
Hi @zeripath and @techknowlogick I used this tutorial to compose my gitea server, only change I had is |
Hmm. I wonder... Were you running the openssh server or the inbuilt SSH server previously? @techknowlogick have we switched to inbuilt by default for docker yet? On 1.9 we were definitely still using opensshd which would explain why 22 worked, if we're now inbuilt by default that would explain why 22 would no longer work. |
1.10 includes SSH improvements, but still has opensshd as default ssh provider in container |
Ah ok well that explains why this setting is likely being ignored in any case! gitea/docker/root/etc/s6/openssh/setup Lines 27 to 32 in f1fdd78
SSH_LISTEN_PORT isn't supported there. Would be a v. Quick fix. |
Thank you guys for fast fix. I will test it at Monday and confirm it's fixed |
I tested it, it works finely! Thanks :) |
… superficial git-clone URL, would implicitly also set SSH_LISTEN_PORT that the SSH service listens on, if the latter is not explicitly configured. This is a corrective fix to prior issues go-gitea#8453 and go-gitea#8477.
[x]
):Description
I have been using docker container
gitea/gitea:1
(1.9.2) with following configuration:Everything have been working fine, until I switched to
gitea/gitea:latest
, after this, I see in log the log that servers starts on port222
, instead of 22, even in config is specified 22, so this means I'm getting connection refused when trying to connect to built in git server. After changing the port forwarding, everything works well. Switching back 1.9.2 makes everything work correctly againThe text was updated successfully, but these errors were encountered: