Cause

The error is caused by the authorization keys (access keys) being not valid, not specified or not specified correctly.

Some of the reasons for keys being not valid are:

  • You generated the keys using your shared account.
  • Your license was previously revoked due to payment issues.
NOTE
If you find this is due to an invoicing or lapsed contract issue, please contact your Adobe Account Team for guidance to get this resolved. After your license is re-activated, your support and deployment entitlements will be restored.

Solution

Take the following steps to solve the issue with the authorization keys (see the sections below for more details on each step):

  1. Obtain the valid authorization keys (skip this if you are absolutely sure your key is valid).
  2. Add the keys value in the env:COMPOSER_AUTH variable (or make sure that the correct value is there) and check if the keys are specified consistently in the variable on the project level and environment level as well as the auth.json file (if it exists) in the project root.
  3. Update or delete auth.json, to have a single place where the key is configured, if the authorization keys values are not specified or have an other value.

1. Obtain valid authorization keys

If you were using the keys created under the shared account, you need to contact the Adobe Commerce license owner who provides you access and request they generate the keys for you.

If your license was previously revoked due to payment issues, and you have resolved those issues and your license was renewed, you need to generate the new authentication keys.

2. Add the keys value in the env:COMPOSER_AUTH variable and check if the same keys are specified in auth.json

See the instructions and related information in Prepare your existing system and Add authentication keys in our developer documentation.

3. Update or delete auth.json

Following is a step by step description of how to update your authorization keys:

  1. Log in to the machine that has your Adobe Commerce on cloud infrastructure SSH keys.

  2. Log in to your project: magento-cloud login

  3. Create a branch to update the code (in the following example the branch name is auth is created from the primary branch): magento-cloud environment:branch auth master

  4. Change to the project root directory.

  5. Optional: Delete the auth.json if you prefer and continue to step 9.

  6. Open auth.json in a text editor.

               {
                 "http-basic":  {
                     "repo.magento.com": {
                         "username": "<public_key>",
                         "password": "<private_key>"
                         }
                       }
                     }
    
  7. Add the correct authentication keys.

  8. Save your changes and exit the text editor.

  9. Commit and merge your changes:

    git add -A

    git commit -m "<message>"

    git push origin master

  10. Wait for the project to deploy.

Previous pageDeployment fails with "Error building project: The build hook failed with status code 1"
Next pageDeployment stuck with "Unable to upload the application to the remote cluster" error

Commerce