Skip to content
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

docker DISABLE_SSH and DISABLE_REGISTRATION environment variables not working #16018

Closed
tamis-laan opened this issue May 29, 2021 · 5 comments · Fixed by #15943
Closed

docker DISABLE_SSH and DISABLE_REGISTRATION environment variables not working #16018

tamis-laan opened this issue May 29, 2021 · 5 comments · Fixed by #15943
Labels
issue/duplicate The issue has already been reported. issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail topic/distribution This PR changes something about the packaging of Gitea

Comments

@tamis-laan
Copy link

Using the latest docker version of gitea docker with docker compose:

  gitea:
    image: gitea/gitea
    environment:
      - GITEA__server__DISABLE_SSH=true
      - GITEA__service__DISABLE_REGISTRATION=true
      - GITEA__repository__DEFAULT_PRIVATE=private
    volumes:
      - ./data/gitea:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 3000:3000

The settings GITEA__server__DISABLE_SSH=true and GITEA__service__DISABLE_REGISTRATION=true are not working while GITEA__repository__DEFAULT_PRIVATE=private does work.

Looks like boolean values are not mapped properly?

@techknowlogick
Copy link
Member

What does the generated app.ini look like?

@techknowlogick techknowlogick added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label May 29, 2021
@tamis-laan
Copy link
Author

tamis-laan commented May 29, 2021

Both parameters are set to false in the app.ini, I changed them to true manually and that works, but I would like to keep the configuration in the docker-compose.yml.

[repository]
ROOT            = /data/git/repositories
DEFAULT_PRIVATE = private <----- This was auto configured properly

[server]
APP_DATA_PATH    = /data/gitea
DOMAIN           = ***********************
SSH_DOMAIN       = *************
HTTP_PORT        = 3000
ROOT_URL         =  ***************
DISABLE_SSH      = false <-- manually changed to true
SSH_PORT         = 22
SSH_LISTEN_PORT  = 22
LFS_START_SERVER = true
LFS_CONTENT_PATH = /data/git/lfs
PROTOCOL         = http
LFS_JWT_SECRET   = *************************
OFFLINE_MODE     = false

[service]
DISABLE_REGISTRATION              = false <-- Manually changed to true
REQUIRE_SIGNIN_VIEW               = false
REGISTER_EMAIL_CONFIRM            = false
ENABLE_NOTIFY_MAIL                = false
ALLOW_ONLY_EXTERNAL_REGISTRATION  = false
ENABLE_CAPTCHA                    = false
DEFAULT_KEEP_EMAIL_PRIVATE        = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = false
DEFAULT_ENABLE_TIMETRACKING       = false
NO_REPLY_ADDRESS                  =

@zeripath
Copy link
Contributor

Did you have to run through the install page?

That's the way that these settings would be overridden and I think I've recently fixed this with another pr.

@tamis-laan
Copy link
Author

tamis-laan commented Jun 24, 2021

Did you have to run through the install page?

That's the way that these settings would be overridden and I think I've recently fixed this with another pr.

I have adjusted the parameters by hand, and have all systems up and running. I have the environment variable set just in case the problem is fixed and I have to re-deploy for some reason. However atm things are running smoothly so I'm not planning to touch my setup for testing.

@markormesher
Copy link
Contributor

FWIW I just tried a new install on 1.15.0-rc3 and can confirm that this is working again. I believe #15943 is the PR with the fix.

@zeripath zeripath added the issue/duplicate The issue has already been reported. label Aug 11, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
@delvh delvh added topic/distribution This PR changes something about the packaging of Gitea and removed theme/docker labels Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported. issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail topic/distribution This PR changes something about the packaging of Gitea
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants