Help Center/
CodeArts Artifact/
Best Practices/
Migrating Local Repository Data to CodeArts Artifact/
Migrating Local npm Registry Data to CodeArts Artifact
Updated on 2025-07-22 GMT+08:00
Migrating Local npm Registry Data to CodeArts Artifact
Step 1: Obtain Target npm Registry Information from CodeArts Artifact
- Log in to the CodeArts homepage and click a card to access a project.
- In the navigation pane, choose Artifact > Self-hosted Repos.
- In the left pane, click the target npm registry name to go to its details page and view the Repository Path.
- Click
next to the repository URL to copy it.
- Click Tutorial in the upper right corner of the page. In the displayed dialog box, click Download Configuration File to download the npmrc configuration file to the localhost.
- Open the configuration file on the localhost, find the value of the _auth field, and decode the value using Base64.
Step 2: Configure Migration Scripts
- Go to the self-hosted repo page and select the target npm registry in the left pane.
- Click the repository name. In the upper right corner of the page, click
and select Download Migration Tool to download the MigrateTool.zip package to the localhost. Then decompress it to obtain uploadArtifact.py (migration tool) and artifact.conf (configuration file).
- Configure the artifact.conf file using the example below. Other parameters can be deleted.
artifact packageType = Component type. Set it to npm. userInfo = Value of the _auth field decoded using Base64 in the npmrc configuration file of the npm registry. (For details, see 6.) repoRelease = Repository URL (repository URL obtained in step 1) repoSnapshot = Left empty srcDir = Directory path of the local npm registry to be migrated. The value is user-defined, for example, C:\Users\xxxxxx\repository.
Step 3: Migrate Data
Run the migration tool obtained in 2 by executing this command:
python uploadArtifact.py
Step 4: Verify Migration Results
Go to the target npm registry in self-hosted repos and verify whether the local npm registry data was uploaded successfully.
If the migration fails, try again or contact customer service.
Parent topic: Migrating Local Repository Data to CodeArts Artifact
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot