Skip to main content
Create a new registry in Harness Artifact Registry with a specified identifier, package type, and optional description.
This command is currently under development and not yet implemented in the CLI.

Usage

hc registry create [identifier] [flags]

Arguments

identifier
string
required
Unique identifier for the registry. Must follow naming conventions:
  • Only lowercase letters, numbers, hyphens, and underscores
  • Must start with a letter
  • Maximum 63 characters

Options

--description
string
Description of the registry
--package-type
string
default:"DOCKER"
Package type for the registry. Supported types:
  • DOCKER
  • MAVEN
  • NPM
  • HELM
  • PYTHON
  • NUGET
  • GO
  • GENERIC
  • CONDA
  • COMPOSER
  • DART

Examples (Planned)

Create a Docker Registry

hc registry create my-docker-registry \
  --package-type DOCKER \
  --description "Production Docker images"

Create an NPM Registry

hc registry create npm-packages \
  --package-type NPM \
  --description "Internal NPM packages for frontend applications"

Create a Maven Registry

hc registry create maven-releases \
  --package-type MAVEN \
  --description "Maven release artifacts"

Create a Python Registry

hc registry create pypi-internal \
  --package-type PYTHON \
  --description "Internal Python packages"

Create a Generic Registry

hc registry create generic-artifacts \
  --package-type GENERIC \
  --description "Generic file storage for build artifacts"

Supported Package Types

hc registry create my-docker-reg --package-type DOCKER

Package Type Details

Package TypeUse CaseTypical Clients
DOCKERContainer imagesdocker, podman
NPMNode.js packagesnpm, yarn, pnpm
MAVENJava artifactsmvn, gradle
PYTHONPython packagespip, poetry, pipenv
HELMKubernetes chartshelm
NUGET.NET packagesnuget, dotnet
GOGo modulesgo get
GENERICAny file typecurl, wget
CONDAConda packagesconda
COMPOSERPHP packagescomposer
DARTDart/Flutter packagesdart, flutter

Registry Naming Conventions

Registry identifiers must follow these rules:
  • Allowed characters: lowercase letters (a-z), numbers (0-9), hyphens (-), underscores (_)
  • First character: Must be a letter
  • Length: 1-63 characters
  • Uniqueness: Must be unique within the account/org/project scope

Valid Names

my-docker-registry
npm_packages
registry123
maven-snapshots

Invalid Names

My-Docker-Registry  # Contains uppercase
123-registry        # Starts with number
my.docker.registry  # Contains periods
my docker registry  # Contains spaces

Registry Hierarchy

Registries are created at the project level by default. The scope is determined by your authentication context:
# Project-level registry (default)
hc registry create my-registry --project my-project

# Organization-level registry
hc registry create my-registry --org my-org --project ""

# Account-level registry
hc registry create my-registry --org "" --project ""

Default Settings

When created, registries have these default settings:
  • Package type: DOCKER (if not specified)
  • Registry type: VIRTUAL (supports upstream registries)
  • Access: Private (authentication required)
  • Cleanup policies: None (manual cleanup required)

After Creation

Once created, you can:
  1. Configure client access:
    hc registry configure npm --registry my-npm-registry
    
  2. Add metadata:
    hc registry metadata set --registry my-registry --metadata "env:prod,team:platform"
    
  3. View details:
    hc registry get my-registry
    

Implementation Status

This command structure is defined but the implementation returns:
registry create command not yet implemented
Use the Harness UI to create registries until CLI support is complete.

Alternative: Create via UI

To create a registry using the Harness UI:
  1. Navigate to Artifacts > Registries
  2. Click + New Registry
  3. Select package type
  4. Enter identifier and description
  5. Configure advanced settings
  6. Click Create

Build docs developers (and LLMs) love