-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Configuring an SSH port other than 22 disables START_SSH_SERVER #7361
Comments
Could you paste your docker-compose file here? |
I suspect this is the problem that #7286 solves.
Ah no I didn't misread it! So the docker by default provides an openSSH server - which listens on port 22. Changing the SSH_PORT in the install page doesn't change the config of the server - so if you change the port in |
#7286 has been merged. Please re-open this issue if you continue to face this issue after updating to most recent docker image. |
Thanks for the quick reaction! If I understand correctly, this is a problem related to the SSH daemon in the docker container and has nothing to do with Gitea. Of course, /install cannot change the behavior of the contariner's SSH daemon and it also makes sense that by default, Gitea does not provide its own SSH server. All clear then! 👍 |
Gitea does provide its own SSH server - and we will be moving the docker to use this by default at some point but at present the docker configuration doesn't use it. |
The same issue is still present on the 1.9.3 docker image. As a workaround, map your own An example file for port 8022 and user 'git':
|
In current master branch there are some code changes that should allow to set the SSH ports in the docker image correctly using the option SSH_LISTEN_PORT. See #7829. Those changes are in master and not yet in a stable release. |
For later reference in case other people encounter this issue: I've succeeded in updating the OpenSSH server port in the latest docker image by setting an environment variable in the
|
I believe such edit should go to the docs. Note: setting either |
@weshouman it already is in the docs: https://docs.gitea.io/en-us/install-with-docker/#environments-variables |
I mean it should be explained in the docs that setting that in the |
[x]
):Description
Configuring an SSH port other than 22 disables START_SSH_SERVER. To reproduce, do:
docker-compose up
, then go to localhost:3000 to be welcomed by the Gitea installation wizardResult: in app.ini, the option START_SSH_SERVER is omitted and thus, it is not possible to access Gittea via the proposed URL
ssh://git@localhost:2222/user/repo.git
as an attempt to do so will result in an exception "ssh_exchange_identification: Connection closed by remote host"Expected result / how to fix: Adding the option
START_SSH_SERVER = true
to app.ini fixes the problem. The installer should do this even when the ssh port is not 22.Note: Be sure to have a high enough port for trying this (e.g. when the port is set to 222, there is a permissions problem on Linux).
The text was updated successfully, but these errors were encountered: