Set Up Remote Composer Repositories

JFrog Artifactory Documentation

JFrog Artifactory
Content Type
User Guide

The public Composer repository does not contain any actual binary packages; it contains the package indexes that point to the corresponding source control repository where the package code is hosted.

Since the majority of public Composer packages are hosted on GitHub, we recommend creating a Composer remote repository to serve as a caching proxy for, specifying as the location of the public package index files. A Composer remote repository in Artifactory can proxy and other Artifactory Composer repositories for index files, and version control systems such as GitHub or BitBucket, or local Composer repositories in other Artifactory instances for binaries.

Composer artifacts (such as zip, tar.gz files) requested from a remote repository are cached on demand. You can remove the downloaded artifacts from the remote repository cache, however you can not manually deploy artifacts to a remote repository.

To define a remote repository to proxy as well as the public Composer Packagist repository follow the steps below:

  1. From the Administration module, go to Repositories | Repositories | Remote and set PHP Composer to be its Package Type

  2. Set the Repository Key, and enter the repository URL (e.g. in the URL field as displayed below .

  3. In the Composer Settings section, select GitHub as the Git Provider, and leave the leave the default Registry URL (e.g.

  4. Finally, click Save & Finish.


URL vs. Registry URL

To avoid confusion:

The URL is the URL of your Git provider where the actual package binaries are hosted.

The Registry URL refers to the URL where the package index files holds the hosted metadata.

To proxy a public Composer registry, set the Registry URL field to the location of the index files as displayed above. To proxy a Composer repository in another Artifactory instance, set both the URL field and the Registry URL field to the remote Artifactory repository's API URL. For example: