[Solved] 2FA is borked after I moved to another server

I was running gitlab 16.8.3 on a home server under docker using official image. Then I moved everything to a new home server, not doing backup/restore but rather moved all files.
Now, everything seems fine except that 2FA stopped working. I couldn’t login with authenticator but I was able to use a recovery code. Then I disabled 2FA and re-enabled it, but now I’m getting the dreaded “Invalid PIN” message. I guess something is wrong with PIN authentication. Time on server seems correct.
Tried also to upgrade to 16.9.2 but it’s the same problem. Health check says everything is fine, no obvious errors are visible.
The question is how can I investigate the issue? What logs should I look at? Any other advice?

OTOH it might still be a wrong timezone on my server, but how does one check what time/timezone gitlab actually uses for 2fa? I mean there is a timezone on host, then within container and finally within gitlab (Changing your time zone | GitLab).

Indeed it was a date time issue on the host.

1 Like