I have created a gitea instance on localhost and copied the repos and database from a working server. However, on localhost, logging in does not work for the admin user, just for normal users. If I try to login as the admin user, I am getting redirected to the login page immediately, and on the top right I can see “Sign In”. If I use the wrong password, I get an error message. I tried to create another admin user from the command line, but this user has the same problem. I am using 1.10.0 on Debian Buster/amd64, together with a Pg database. What gives?
I’d suggest you create a new user with admin privileges and regenerate keys and hooks from command line using:
gitea --config /path/to/app.ini admin create-user --username newadmin --password value --email unique-email@mycompany --admin gitea --config /path/to/app.ini admin regenerate keys gitea --config /path/to/app.ini admin regenerate hooks
If you can get in with this new admin, you can go and check what’s wrong with your other user. But probably some problems may have happened by just moving the program around.