This article provides a fix for the issue when deployment fails with the following error message:
W: In CurlDownloader.php line 370: W: W: curl error 7 while downloading https://repo.packagist.org/p2/magento/module W: -sitemap.json: Failed to connect to repo.packagist.org port 443: Connection W: refused
Adobe Commerce on cloud infrastructure, all supported versions
Deployment fails with a curl error 7 message.
Steps to reproduce:
Trigger a deployment.
Deployment is successful.
Deployment fails, and the following error: curl error 7 while downloading … port 443: Connection refused appears in the deploy log.
This might be due to the cache connection being lost to the repo.
Ask a Super User on the project to run this command:
magento-cloud project:clear-build-cache -p <project ID>
To check who on the project is a Super User, refer to View a user’s project role in the Commerce on Cloud Infrastructure Guide.