Introduction
When working with PHP Composer Smart Remote Repositories in Artifactory, you may encounter a “404 Not Found” error while attempting to install packages.
One of the possible causes of this error can arise when not changing the default Git Provider during the configuration of the Smart Remote Repository.
This article will walk you through the steps required to configure a PHP Composer Smart Remote Repository.
Resolution
Follow the steps below to configure the Smart Remote PHP Composer Repository in Artifactory:
- Ensure that the Target Artifactory instance has a PHP Composer repository, which we will reference in the following step.
- On the Source Artifactory instance, create a Remote PHP Composer repository. In the configuration of the repository, update the URL to: <TARGET_ARTIFACTORY_URL>/artifactory/api/composer/<TARGET_REPOSITORY_NAME>
- Change the Git Providers to Artifactory.
- In the Registry URL field, add the following URL, which should be the same as the URL in step 2:
<TARGET_ARTIFACTORY_URL>/artifactory/api/composer/<TARGET_REPOSITORY_NAME> - Add a User Name and Password for the Target Artifactory instance.
