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 image fails to create default administrator account #17630

Open
swestlake opened this issue Nov 13, 2021 · 0 comments
Open

docker image fails to create default administrator account #17630

swestlake opened this issue Nov 13, 2021 · 0 comments

Comments

@swestlake
Copy link

swestlake commented Nov 13, 2021

Gitea Version

1.15.6

Git Version

2.30.2

Operating System

docker

How are you running Gitea?

official docker image

Database

PostgreSQL

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

When the user opts not to create a new administrator on the first wizard web pages (first login), the system fails to create any new user.

There is a note on the wizard that a "default" administrator account would be created on the page where the database settings are --- however it fails to create one.

The only system user(bash shell) that can facilitate creating a new gitea user is going to a shell via the gitea docker container and creating the account from there:: (it's a workaround for anyone who is stuck in the first-run setup)

the work-around I used:

on the docker host,
docker exec -it gitea bash

once in the gitea container,
su -l git
(otherwise there are errors with when trying to update things as the root user)

gitea -c /data/gitea/conf/app.ini admin user list

^ the user needs to specify "-c /data/gitea/conf/app.ini", otherwise the configuration path defaults to elsewhere. This should be improved -- from what I can tell this does not occur while using the root account within the gitea container..

create an administration account,
gitea admin user create --name _admin_name_ --password _password_ --email useremail@somewhere.net --admin -c /data/gitea/conf/app.ini

the new administator account now shows in the user list,
gitea -c /data/gitea/conf/app.ini admin user list

exit the container,
type exit , exits the "git" user login
type exit again , exits the gitea container bash session

^ users can use this as a workaround, if they do not have any default user account(which should also be an administrator account with the "--admin" option)

I never used gitea before (as on a host setup), so this is my first time trying it in a docker container.

If the host-native setup works without this issue, then the bug must be related to the docker image only I suppose.

thanks

Screenshots

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant