Deployment fails with correct access keys in env:COMPOSER_AUTH or auth.json
This article provides a solution for the issue when your deployment fails with an error such as the one below, in the deployment log:
W: [ Composer\Downloader\TransportException] W: The "https://repo.magento.com/archives/magento/module-customer-balance/magento-module-customer-balance-100.4.0.0.zip" file could not be downloaded (HTTP/1.1 404 Not Found)
Description description
Environment
۶Ƶ Commerce on cloud infrastructure 2.4.x
Issue
Steps to reproduce:
Attempt to deploy.
Expected results:
You deploy successfully.
Actual results:
Note: This is an example error. You could get an error indicating a different file (depending on which ۶Ƶ Commerce version you deploy).
You do not deploy successfully. You see an error like The “https://repo.magento.com/archives/magento/module-customer-balance/magento-module-customer-balance-100.4.0.0.zip” file could not be downloaded (HTTP/1.1 404 Not Found) in the deployment log.
Cause
The specified composer access keys found in one of these locations may not have access to the code:
- in the
env:COMPOSER_AUTH
variable on the project level. - in the
auth.json
file, which takes precedence over theenv:COMPOSER_AUTH
variable.
Resolution resolution
Update the env:COMPOSER_AUTH
variable on the project level and ensure that it is configured with keys that have access to the code.
For steps, refer to in Commerce on Cloud Infrastructure Guide.
Related reading
۶Ƶ Commerce on cloud repo could not be accessed: 403 Forbidden or 404 Not Found error when deploying