-
Notifications
You must be signed in to change notification settings - Fork 17
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
GID already in use #6
Comments
Hi @xxlbug, thanks for reporting this. I am able to reproduce it. I totally overlooked this potential use case. I'll think about it and what could be the best approach to work around it. |
After giving this some thought I would say the current behavior is the right one. Modifying/deleting system users/groups must be handled with care. The logic to do so (without installing any additional packages) goes far beyond the currently supplied simple setup script. Plus, I don't expect many users to stumble across conflicts with system user/group IDs to be honest. Most hosts will use IDs greater than 1000 for their user IDs. Let me know if you think otherwise. For those that face errors like:
Instead of modifying the Dockerfile, the current setup allows for custom scripts to be run during container initialization. One can create a script, e.g.
In this particular case, modifying the system users/groups to allow for UID:GID combination 99:100 to be used for git is pretty straight forward since those UID:GID do not own any files in the system. No delicate file ownership changes are required.
So I'm inclined not to fix this issue but leave it open for future reference in case someone else finds the same problem. I know it is not great but I could not come up with an easy, quick and elegant way to allow for virtually any UID and GID to be used. I'm open to suggestions on any aspect and from anyone, so please keep them coming and thanks for contributing. |
@rockstorm101 thank you for the advice and script, it works now fine. I think it would be best to close this ticket and let people look in the closed tickets to search for solved problems. But up to you :-) |
Hi there,
thank you for making this, i got really frustrated with gitlab, gitea and gogs. Git-server seems to be all i need and is much leaner :-)
I have a small but important problem which prohibits me from using git-server right now:
On my host system the UID and GID i want to use for git-server are 99/100. On boot i get the error that GID 100 is already in use (from the default group "users" as seen in /etc/group).
08/01/2023 21:36:15 deluser: can't find git in /etc/group 08/01/2023 21:36:15 addgroup: gid '100' in use 08/01/2023 21:36:16 id: unknown user git 08/01/2023 21:36:16 deluser: unknown user git
I could change the dockerfile to manually change the gids around but wanted to try to find a better solution which also avoids this problem in the future for others.
My ideas so far:
I can make the changes and create an PR but would like to have some input before.
Thank you
The text was updated successfully, but these errors were encountered: