Gitea admin tips and tricks...

I recently started having issues with my Yubikey / Security Key that I use for Gitea, and was unable to login.

This explains how to fix it.

 

Connect to the database. I only have a single user, and so I use the sqlite3 database backend.

$ sqlite3 gitea.db

sqlite> select id from user where name="wkumari";
sqlite> 
delete from u2f_registration where user_id =1;

This still didn't work -- and then I noticed that the url ended in 'webauthn', so I also did:

$ sqlite3 gitea.db

sqlite> select * from webauthn_credential;
sqlite> 
delete delete from webauthn_credential where id=2;

Done!