Synopsis
Copies a specific version of an artifact package from one registry to another within your Harness account.Arguments
Source package path in format:
<SRC_REGISTRY>/<PACKAGE_NAME>/<VERSION>Target registry identifier where the package will be copied
Options
Artifact type (e.g.,
model or dataset). Required for certain registries like Hugging Face.Source Path Format
The source path must follow this structure:SRC_REGISTRY- Source registry identifierPACKAGE_NAME- Full artifact path (can include nested paths)VERSION- Specific version to copy
Examples
Operation Flow
The copy operation performs the following steps:- Validates input parameters - Checks format and required fields
- Parses source path - Extracts registry, artifact, and version
- Initiates copy - Requests server-side copy operation
- Returns result - Confirms successful copy
Important Notes
Server-side operation - The copy happens entirely on the server. No data is transferred through your client.
Version-specific - The copy command copies a specific version, not all versions of an artifact.
Validation Rules
The command validates:- Source path has exactly 3 components (registry/artifact/version)
- Registry identifier is not empty
- Artifact path is not empty
- Version is not empty
- Target registry identifier is provided
- Account identifier is configured
Error Handling
Invalid source path format
Invalid source path format
Source artifact not found
Source artifact not found
hc artifact get.Destination registry not found
Destination registry not found
hc registry list.Permission denied
Permission denied
Missing artifact type
Missing artifact type
--artifact-type flag for registries that require it (e.g., Hugging Face).Use Cases
Promote artifacts between environments
Promote artifacts between environments
Create backups
Create backups
Migrate between registries
Migrate between registries
Share across teams
Share across teams
Tips for Complex Package Names
Handling Nested Paths
Package names can include multiple path segments:Scoped NPM Packages
Maven Coordinates
Verification
After copying, verify the artifact exists in the destination:See Also
- hc artifact push - Push new artifacts
- hc artifact list - List artifacts in registries
- hc artifact get - Get artifact details
- hc registry list - List available registries