Can’t access Adobe Commerce on cloud repo: 403 Forbidden or 404 Not Found error when deploying

To resolve Adobe Commerce deployment errors such as 403 Forbidden or 404 Not Found, obtain valid authorization keys and ensure they are correctly specified in the env:COMPOSER_AUTH variable and the auth.json file.

Note: Having valid authorization keys alone does not guarantee access to the code. If there is an invoicing issue or your contract has expired, you will lose access to the code and the ability to submit support tickets.

Description description

Environment

Adobe Commerce on cloud infrastructure versions 2.2.x, 2.3.x, and 2.4.x

Issue/Symptoms

When deploying Adobe Commerce on cloud infrastructure, you might encounter errors indicating that the repository URL could not be accessed, resulting in deployment failure. In the deployment error log in the Project UI, an error message similar to the following is displayed:

The ‘https://repo.magento.com/archives/magento/magento-cloud-configuration/magento-magento-cloud-configuration-x.x.x.x.zip’ URL could not be accessed: HTTP/1.1 403 Forbidden

OR


The ‘https://repo.magento.com/archives/magento/module-customer-segment/magento-module-customer-segment-x.x.x.x-patchY.zip’ file could not be downloaded (HTTP/1.1 404 Not Found)

(Click the Failure icon in the Project UI to see the log.)

Cause

The primary cause of these errors is invalid or incorrectly specified authorization keys. This can happen due to:

  • Using keys generated from a shared account
  • License revocation due to payment issues
  • The configured keys were deleted from the account
  • Using different authentication keys in env:COMPOSER_AUTH and auth.json, which can cause entitlement conflicts and package download failures
  • The Adobe Commerce entitlement has been moved to a different account (MAGE ID), while the environment continues to use Composer authentication keys generated under the former/discontinued account.

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.

Resolution resolution

Before you begin: Ensure that you are using Composer authentication keys generated under the currently entitled Adobe Commerce account. Keys generated under a former or discontinued account will not work.

Step 1: Generate new authentication keys

  1. Contact the Adobe Commerce license owner to generate new authentication keys if you were using keys created under a shared account. If your license was previously revoked due to payment issues and has since been renewed, you must
    generate new authentication keys.
  2. If the account owner cannot sign in to the
    Adobe Commerce Marketplace,
    submit a
    support request
    through Adobe Experience League.
  3. If the account owner can sign in, verify that the
    MAGE ID
    is associated with the correct email address. If the association is incorrect, open a Marketplace support ticket using
    Contact Us,
    or email
    Commerce Marketplace Support
    to request an update.

Step 2: Update Composer authentication configuration

Add the authentication keys to the env:COMPOSER_AUTH variable, or verify that the correct values are already configured. Ensure the values are consistent at the project level, environment level, and in the auth.json file (if present). For details, see Prepare your existing system.

Step 3: Update or remove auth.json

If you use the env:COMPOSER_AUTH variable, Adobe recommends removing auth.json from the project to avoid conflicting credentials. If you keep the file, ensure it contains the correct authentication keys.

Log in to the machine that has your Adobe Commerce on cloud infrastructure SSH keys, then log in to your project:

magento-cloud login

Create a branch to update the configuration (for example, auth):

magento-cloud environment:branch auth

From the project root, open auth.json in a text editor and update it as needed:

{
  "http-basic": {
    "repo.magento.com": {
      "username": "<public_key>",
      "password": "<private_key>"
    }
  }
}

Step 4: Commit changes and deploy

Save your changes, then commit and push them to the repository:

git add -A
git commit -m "<message>"
git push origin master

Monitor the deployment status in the Project UI and confirm that package downloads complete successfully.

Composer authentication credentials error during deployment to Production in Adobe Commerce Cloud

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f