This document describes how to store Composer artifacts in CODING-AR for centralized artifact management and version control. The following sections introduce how to create an artifact, configure authentication, and pull and push artifacts.
Before you begin:
- Install Composer.
- Create an artifact repository (see Basic Operations).
- Select Composer as the repository type.
Run the following command to install Composer.
Create a demo directory.
Go to the directory where the Composer package is located and create an
auth.json file. You can select manual or automatic configuration.
Click Generate configuration from access token and then copy the content to the
Copy the commands on the webpage and replace
[PASSWORD] with your service password.
Run the commands on the CODING-AR page to compress Composer package files into a
zip package and then push it to the repository using tools such as
Enter the password configured in
auth.json and replace
<version> with the specific version number.
After the push is successful, you can view the package in CODING-AR.
Go to the Composer package directory and set the repository URL. You can use the commands in CODING.
Replace the Composer source with the CODING repository (optional).
If you try to pull an artifact that does not exist in the CODING private repository, the system will try to pull from the configured proxy. You can add a third-party artifact source to obtain artifacts from the specific repository. Without the need for configuration, CODING will retrieve artifacts in sequence from top to bottom.