API-Schlüssel über die Konsole festlegen

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.

Hey @pfaffman, wie kann ich diese Schritte innerhalb der App befolgen? Ich meine: Nach dem Befehl ./launcher enter app, wie kann ich die von dir genannten Befehle verwenden?

Du solltest einfach rake api_key:get ausführen können — probier es mal. Ich habe mir den Befehl noch nicht angesehen, daher bin ich unsicher, ob du noch weitere Parameter benötigst.

Danke für deine Antwort. Ich habe mein Problem mit dieser Lösung hier gelöst: Locked out of admin account after disabling SSO Memberful - #5 by Thamer

Wo kann ich mehr über Befehle, App-Befehle und Ähnliches erfahren? Es ist schwierig, grundlegende Informationen zu finden, und wenn ich Probleme habe, fällt es mir schwer, sie zu lösen.

Du würdest

./launcher enter app
rake api_key:get

Vielleicht schaust du dir auch Administrative Bulk Operations an.