gpt4 book ai didi

openshift - OpenShift 上的 Ghost 博客被锁定

转载 作者:行者123 更新时间:2023-12-04 17:19:15 26 4
gpt4 key购买 nike

我有一个在 Open Shift 上运行的 Ghost 应用程序实例。由于某种原因,当我尝试登录 myapp.domain/ghost 时,它不再能够找到我的电子邮件。

如何更改管理员电子邮件设置?

最佳答案

我根据 @niharvey 在他的第 5 步中提供的引用资料改编了以下内容,不幸的是该引用资料处于离线状态。包括缺少的步骤在内的完整过程如下:

您需要什么:

  • root (不是真的,只是写入权限)
  • 数据库路径 ($OPENSHIFT_REPO_DIR/content/data)
  • Bcrypt所需密码的哈希值(我们称之为 bcrypt-hash)
  • 使用的电子邮件地址(下面的select语句)

通过 SSH 连接到您的应用:

rhc ssh appname

使用适当的数据库路径启动sqlite:

$ cd $OPENSHIFT_REPO_DIR/content/data
$ sqlite3 ghost.db

显示数据,例如使用的电子邮件地址和列名称​​(可选):

sqlite> PRAGMA table_info(users);
sqlite> select * from users;
sqlite> select email from users;

解锁帐户并重置密码:

sqlite> update users set status = 'active' ;
sqlite> UPDATE users SET password = 'bcrypt-hash' WHERE email = '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cab3a5bfb8afa7aba3a68aada7aba3a6e4a9a5a7" rel="noreferrer noopener nofollow">[email protected]</a>';

关于openshift - OpenShift 上的 Ghost 博客被锁定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24328916/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com