Be very careful with your passwords in Apple’s passwords app. I believe I've just lost access to my Gitlab account because I created a new password entry (for a PAT) with the same username as my existing one.

It nuked the 2FA setting and recovery codes and don't see any way to get them back.

If anyone has any idea how to recover the 2FA settings or get back into the account, I'd appreciate it.

I have daily backups - does anyone know where the passwords app keeps its data and how I could restore it from backup? All I need is the recovery codes which I’d attached to the password item (in hindsight not a great idea but probably very common).

@rmondello perhaps?

@finestructure oh no, wish you a speedy recovery and I think it’s a super common thing to keep credentials and 2FA in one place. Would be great to have a history in place where every change can be tracked down and, if required, reverted.

@kimar Yeah. I checked deleted items in the Passwords app but it's not there. It simply replaced the existing entry, effectively stripping all the settings.

I was still logged in with Firefox and had the password saved in its local password manager - but not the 2FA. So I could reset the password to something new but still can't get back in.

From what I've read Gitlab can’t/won't help here…

Ok, good news: while gitlab.com don't restore accounts when you lose your 2FA keys, you •can• regenerate them via SSH if you've added an SSH key to your account (which many people probably do):

$ ssh [email protected] 2fa_recovery_codes
Are you sure you want to generate new two-factor recovery codes?
Any existing recovery codes you saved will be invalidated. (yes/no)

That just saved my account. (I had a spare account, too, but it would still have been massively annoying.)