Root password reset and more generally Gitea CLI usage
-
Hello,
I haven't been able to reset the root account password on my Gitea instance, and more generally, any command that I issue (
/home/git/gitea/gitea admin user list
) do fail.It appears that Gitea doesn't want to pick the custom location for configuration file, or that I don't know how to set it up correctly.
Related discussion here on Stackoverflow.
su git bash -c "/home/git/gitea/gitea admin user change-password -u root -p badpassword -c "/app/data/app.ini" "
Any help would be greatly appreciated
root@6cb7d536-ceaa-4d26-b387-fbd54b1c02b6:/app/data# su git bash -c "/home/git/gitea/gitea user list" 2021/10/29 16:46:48 cmd/web.go:102:runWeb() [I] Starting Gitea on PID: 26034 2021/10/29 16:46:48 ...s/setting/setting.go:569:NewContext() [W] Custom config '/home/git/gitea/custom/conf/app.ini' not found, ignore this if you're running first time 2021/10/29 16:46:48 ...s/setting/setting.go:1164:CreateOrAppendToCustomConf() [F] failed to create '/home/git/gitea/custom/conf/app.ini': mkdir /home/git/gitea/custom: read-only file system
-
@luzeal Try something like:
sudo -u git /home/git/gitea/gitea -c /run/gitea/app.ini admin user change-password -u root -p changeme123
To explain:
- The app runs as
git
user (doesn't run as root) - The config file is located at
/run/gitea/app.ini
- The gitea binary is at
/home/git/gitea/gitea
I will update our docs with this info.
- The app runs as
-
Thanks for your extremely quick and helpful answer!
It worked!
Side note: I have been using cloudron for about 2 years now, and I am a happy paying customer.
The fact that it is the first question I had to ask so far is a testament to the quality of your work and documentation. Congratulations to the team!