إعداد مفتاح API عبر وحدة التحكم

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

بخصوص الأوامر وأوامر التطبيقات وما إلى ذلك، أين يمكنني معرفة المزيد عنها؟ من الصعب العثور على معلومات أساسية وصعب حل المشكلات عندما أحتاج إليها.

يمكنك

./launcher enter app 
 rake api_key:get

ربما تفيدك مراجعة العمليات الجماعية الإدارية