| Method | When to use |
|---|---|
| Device code login (default) | You want to log in with your Acquia ID in a browser and you do not want to create or manage API keys. |
| API key and secret | You already have a Cloud Platform API token, or you must log in without a browser, such as in CI/CD pipelines or scripts. |
To log in with a device code:
Run the following command:
acli auth:loginAcquia CLI displays a verification URL and a one-time code:
acli auth:login --no-interaction
Sign in to Acquia ID in your browser:
https://id.acquia.com/activate
Then enter this code when prompted:
QGTMTDQK
[INFO] Opening https://id.acquia.com/activate?user_code=QGTMTDQK
Confirm the code above matches what appears in your browser before approving.
Waiting for authorization... (code expires in 10 minutes)
✓ Authenticated successfully.
Click Next.
Sign in to your Acquia ID. You can use your email address and password, or select Sign in with Google. After you authenticate, the system activates the device and approves the request. For additional information, refer to Sign in with Google.
Return to your terminal. The terminal waits for approval and displays Authenticated successfull.
To log in with an API key and secret, run the following command:
acli auth:login --use-legacy-authThis command prompts you to open the page from which you can create a Cloud Platform API token in the Cloud Platform user interface.
If you use other Acquia products, such as Pipelines CLI, your machine might already be authenticated with the Cloud Platform, and you can reuse an existing token.
To interact with Cloud Platform, you must generate and upload an SSH key. This allows you to access your Cloud Platform environments using SSH.
Run the following command:
acli ssh-key:create-uploadFor more information on Acquia CLI, see Acquia CLI commands.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
If this content did not answer your questions, try searching or contacting our support team for further assistance.