Unlock yourself out of Ghost on SQLite3

So, on OpenShift you're going to be able to simply install Ghost blogging platform either with MySQL Database or without a Database (well, not really, it is going to write your stuff on the fantastic SQLite3).

Chances are that, as me, you forgot to setup the Mail Server AND you have passwords so good that you happen to do not know them yourself.

Now you failed your 5th attempt to login and Ghost just locked you out with no chances to recover your password.

Luckly once you've setup your RHC Tools you can use SSH and change that password manually.

Get your app name rhc apps

From your Terminal log to SSH rhc ssh yourapp

Move to the Data folder cd $OPENSHIFT_REPO_DIR/content/data and open the Ghost DB with SQLite3 sqlite3 ghost.db

Check the current mail if you need so SELECT email from users;

Generate a BCrypt password from http://www.asecuritysite.com/encryption/bcrypt and copy the value from the Hash field.

Unlock your user UPDATE users SET status = 'active' WHERE email = '[email protected]';

and set the new password UPDATE users SET password = 'ValueFromHash' WHERE email = '[email protected]';

VoilĂ , happy password forgetting!