Is there a way to set the main api key via the console?
YML=app
SSH_USER=root@host
API_KEY=`ssh $SSH_USER sudo docker exec -w /var/www/discourse -i $YML rake api_key:get`
Does this get or set the api?
It does both. It sets it if it’s not set already.
Is the api key being passed in and used or is rake api_key:get creating one if one does not exist?
Context is rebuilding an instance and keeping the old api key.
If the database persists then the API key persists.
Cool. So it’s in the database somewhere.
Context is building from scratch and testing the importing routines.
Thanks Jay, cheers!
Have a look at the rake task in lib/tasks/api_key.
嗨 @pfaffman,我该如何在应用内执行这些步骤?我的意思是,在运行 ./launcher enter app 之后,该如何使用你提到的这些命令?
应该可以直接运行 rake api_key:get —— 试试看。我还没查看该命令,所以不确定是否需要任何参数。
感谢您的回复,我确实通过此解决方案解决了我的问题:Locked out of admin account after disabling SSO Memberful - #5 by Thamer
关于命令、应用命令等内容,我在哪里可以了解更多?目前很难找到一些基本信息,而且在需要解决问题时也感到棘手。