Gitea Doesn't Start After Update to 1.19

I updated a Gitea instance (1.18.5) to 1.19 today, but it won’t start. I run it in Kubernetes, so I get pod “completed”, and then backoff.

Here are the logs:
Server listening on :: port 22.
Server listening on 0.0.0.0 port 22.
2023/03/21 17:42:03 cmd/web.go:105:runWeb() [I] Starting Gitea on PID: 19
2023/03/21 17:42:03 …s/setting/setting.go:322:loadRunModeFrom() [F] Expect user ‘gitea’ but current user is: git

In my config, I set the RUN_USER to git (was gitea), and this seems to fix the problem.
RUN_USER = git

I don’t see anything in the release notes about it. I’m not sure if I had an improper config fore.

As you noted, RUN_USER is the user running Gitea.
In our docs we usually recommend git, but I’m curious what would have set it before this update and why it was changed.

Technically the user can be anything so long as it matches, which is why I find it odd that something would have altered it.

Do you have any more information about your setup that may be relevant?

Thanks for the reply.

Agreed. I’m not sure why it was working, and now isn’t.

I don’t think there’s anything else that’s relevant. It’s the standard docker image. Here’s all of my current config (after changing the RUN_USER):

RUN_USER = git
RUN_MODE = prod

[oauth2]
JWT_SECRET = *

[security]
INTERNAL_TOKEN = *
INSTALL_LOCK = true
SECRET_KEY = *

[repository]
ROOT = /data/gitea/repos
DEFAULT_PRIVATE = true

[repository.pull-request]
DEFAULT_MERGE_STYLE = squash

[ui]
EXPLORE_PAGING_NUM : 50
ISSUE_PAGING_NUM : 50
MEMBERS_PAGING_NUM : 50
FEED_MAX_COMMIT_NUM : 10
FEED_PAGING_NUM : 50
SITEMAP_PAGING_NUM : 50
GRAPH_MAX_COMMIT_NUM : 100
CODE_COMMENT_LINES : 7
DEFAULT_THEME : arc-green

[server]
PROTOCOL = http
DOMAIN = git.domain.com
ROOT_URL = https://git.domain.com
HTTP_PORT = 3000
START_SSH_SERVER = true
BUILTIN_SSH_SERVER_USER = git
SSH_DOMAIN = git.domain.com
SSH_PORT = 2022
APP_DATA_PATH = /data/gitea

[database]
DB_TYPE = sqlite3
NAME = gitea
USER = gitea
PASSWD =
CHARSET = utf8
PATH = /data/gitea/gitea.db

[mailer]
ENABLED = true
HOST = smtp.mailgun.org:587
USER = gitea@mg.domain.com
PASSWD = `*`

[service]
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL = true
DISABLE_REGISTRATION = true
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = false
DEFAULT_KEEP_EMAIL_PRIVATE = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = false
DEFAULT_ENABLE_TIMETRACKING = false

[picture]
DISABLE_GRAVATAR = false
ENABLE_FEDERATED_AVATAR = true
AVATAR_MAX_FILE_SIZE = 20971520

[attachment]
ENABLED = true
MAX_SIZE = 100
MAX_FILES = 50
ALLOWED_TYPES = */*

[admin]
DEFAULT_EMAIL_NOTIFICATIONS = onmention

[time]
FORMAT = 2006-01-02 15:04:05

I’m having a similar issue

cmd/web.go:105:runWeb() [I] Starting Gitea on PID: 7
…s/setting/setting.go:322:loadRunModeFrom() [F] Expect user ‘git’ but current user is:

Your error message looks like there is no user with uid 1002 on your system. Can you run command id 1002 and show what it responds? Also what version of Docker server are you running (check with docker --version)?

Unfortunately, I’ve already moved on from this, so wouldn’t be able to repeat the error.

I’m running this in a hosted Kubernetes cluster.

It’s a bug in Gitea 1.19

1 Like

One more question, do you have “DISABLE_SSH=false” and “START_SSH_SERVER=true” in your app.ini , aka, have you enabled Gitea’s builtin SSH server?

START_SSH_SERVER = true
BUILTIN_SSH_SERVER_USER = git
SSH_DOMAIN = git.domain.com
SSH_PORT = 2022

I don’t have DISABLE_SSH set though.

If you could build your own docker image, welcome to try this fix Fix incorrect CurrentUser check for docker rootless by wxiaoguang · Pull Request #24435 · go-gitea/gitea · GitHub. Or I think it could be merged in one or two days soon then you can try the 1.19 nightly image.

1 Like

@wxiaoguang unfortunately I don’t have enough time in the foreseeable future. I appreciate you fixing and linking with the PR though!

Docker (1.19-dev-*) these images contain Fix incorrect CurrentUser check for docker rootless by wxiaoguang · Pull Request #24435 · go-gitea/gitea · GitHub

1 Like