Q: how to reset the admin password when the command line appears to not work??
Fresh install on Ubuntu 22.04. I installed gitea from the snap store, then did a apt install of mysql 5.7.42 from mysql.com’s repo (after adding gpg key, setting up sources.list, etc). Created my gitea user and giteadb in mysql.
Walked through the gitea installation, appeared successful. Looked around, everything appeared to be “working”. Logged out and now it will not let me log back in again.
The app.ini file for the snap appears to be in the following location and I see my a few instances of PASSWORD in it:
/var/snap/gitea/common/conf/app.ini
No support… figure it out as you go… welcome to “open source”!
So it appears because of the confinement imposed by snap, and because the snap command is a multicall binary (which in turn calls the application you wish to run, with constraints), you have to execute the gitea command as an argument to /usr/bin/snap, and then pass it appropriate arguments, for it to behave normally. So in my case:
# /usr/bin/snap run gitea admin user list
ID Username Email IsActive IsAdmin 2FA
1 gitea .....
<snip>
You will still receive some errors in the course of running it this way… but at least it’s something.
Would be nice to have some snap specific documentation … (feel free to provide any snap specific documentation links if I am missing it).
While it appears the gitea snap package also contains SQLite3 (and is enabled regardless if it’s used or not), you still need to install git separately.