This article discusses how to resolve the Adobe Commerce on cloud infrastructure failed deployment error similar to the following:
"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-102.0.5.0-patch2.zip" file could not be downloaded (HTTP/1.1 404 Not Found)”.
Error message on deployment indicating the repo URL could not be accessed.
Steps to reproduce
Trigger deployment manually or by performing a merge, push, or synchronization of your environment.
Actual result
Deployment gets stuck. 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 404 Not Found]”.
(Click the “Failure” icon in the Project UI to see the log.)
Expected result
Deployment is completed successfully.
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:
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.
Take the following steps to solve the issue with the authorization keys (see the sections below for more details on each step):
env:COMPOSER_AUTH
variable (or make sure that the correct value is there) and check if the keys are specified consistently in the variable and the auth.json
file in the project root.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.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.
See the instructions and related information in Prepare your existing system and Add authentication keys in our developer documentation.
Following is a step by step description of how to update your authorization keys:
Log in to the machine that has your Adobe Commerce on cloud infrastructure SSH keys.
Log in to your project: magento-cloud login
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
Change to the project root directory.
Optional: Delete the auth.json
if you prefer and continue to step 9.
Open auth.json
in a text editor.
{
"http-basic": {
"repo.magento.com": {
"username": "<public_key>",
"password": "<private_key>"
}
}
}
Add the correct authentication keys.
Save your changes and exit the text editor.
Commit and merge your changes:
git add -A
git commit -m "<message>"
git push origin master
Wait for the project to deploy.