Docker: Gitea Install: the 'run as' username is not the current username: git -> ntp #13723

Closed
opened 2025-11-02 10:51:21 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @mooleshacat on GitHub (Nov 18, 2024).

Description

I know this issue has been mentioned before, however it is still not fixed.

For some reason my gitea was running as the "ntp" user and it was demanding I set runas user to "ntp" instead of "git".

Originally I had a line in my docker-compose.yml like this:

      - USER_UID=123
      - USER_GID=132

123/132 is the UID/GID of the user "git" on my host system.

Upon loading the installer it gave the error "Docker: Gitea Install: the 'run as' username is not the current username: git -> ntp"

It turns out that UID 123 is the UID of NTP, so I tried commenting out the UID/GID and setting the USER:

      - USER=git
      #- USER_UID=123
      #- USER_GID=132

Now when I start the installer, everything works, and it works under the "git" user as expected.

I think the documentation for docker needs to remove the UID/GID completely, so that users who do a docker install are not faced with the same error.

Gitea Version

1.22.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

docker

How are you running Gitea?

Running docker install. Tried latest tag, and v1.22.3 and both have same issue.

Database

MySQL/MariaDB

Originally created by @mooleshacat on GitHub (Nov 18, 2024). ### Description I know this issue has been mentioned before, however it is still not fixed. For some reason my gitea was running as the "ntp" user and it was demanding I set runas user to "ntp" instead of "git". Originally I had a line in my docker-compose.yml like this: ``` - USER_UID=123 - USER_GID=132 ``` 123/132 is the UID/GID of the user "git" on my host system. Upon loading the installer it gave the error "Docker: Gitea Install: the 'run as' username is not the current username: git -> ntp" It turns out that UID 123 is the UID of NTP, so I tried commenting out the UID/GID and setting the USER: ``` - USER=git #- USER_UID=123 #- USER_GID=132 ``` Now when I start the installer, everything works, and it works under the "git" user as expected. I think the documentation for docker needs to remove the UID/GID completely, so that users who do a docker install are not faced with the same error. ### Gitea Version 1.22.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System docker ### How are you running Gitea? Running docker install. Tried latest tag, and v1.22.3 and both have same issue. ### Database MySQL/MariaDB
GiteaMirror added the issue/not-a-bug label 2025-11-02 10:51:21 -06:00
Author
Owner

@mooleshacat commented on GitHub (Nov 18, 2024):

Actually, this was a result of a tutorial I followed at digitalocean. I will notify them of their mistake.

By changing back to the documented default:

      - USER_UID=1000
      - USER_GID=1000

it works as expected.

I am not sure why digitalocean asks you to create a user "git" on the host, and set the UID/GID to that of the host user "git"

@mooleshacat commented on GitHub (Nov 18, 2024): Actually, this was a result of a tutorial I followed at digitalocean. I will notify them of their mistake. By changing back to the documented default: ``` - USER_UID=1000 - USER_GID=1000 ``` it works as expected. I am not sure why digitalocean asks you to create a user "git" on the host, and set the UID/GID to that of the host user "git"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13723