Can't log into Ghost due to email 2FA

What app is this about, and its version: Ghost 6.0+
What YunoHost version are you running: Yunohost 12
What type of hardware are you using: Old laptop or computer

Describe your issue

Can’t log into Ghost. Server is not set up with email verification.

Share relevant logs or error messages

Failed to send email. Please check your site configuration and try again.

Hi, I’m mostly just documenting my frustration here, as well as posting a solution for others.

In 5.118.0 Ghost added email verification/2FA. If you’re like me and don’t have email configured, you’re probably very frustrated to be locked out of your own account.

Here’s the solution: run sudo nano /var/www/ghost/ghost/config.production.json. This will open the config file for your Ghost install. Change “staffDeviceVerification” from “true” to “false” and save (Ctrl+S) and exit (Ctrl+X) and restart your Ghost install. Then you’ll be able to log in again.

Note that you’ll have to do this again after every update, so keep that command handy.