Install vpctl
Install the vpctl command-line tool, configure registry credentials, and review external CLI requirements.
읽는 시간 3분최근 업데이트: 하루 전
Unity provides
install-vpctl.shThis page explains the script's options, the external CLIs that vpctl uses for specific operations, and how to configure the registry credentials vpctl uses to pull releases../install-vpctl.sh latest
Requirements
vpctl is a single Go binary, it has no runtime dependencies of its own. External CLIs are required only for operations that shell out to them:You need... | Required for... |
|---|---|
| The install script ( |
| |
| |
| |
| |
| Only if you want to validate |
Install the vpctl binary
The install script automatically detects your OS and architecture and downloads the correct binary from the Unity registry. Prerequisites: You need registry credentials (username and password). Unity provides these credentials. The script supports interactive mode for users and non-interactive mode for CI and automation.Interactive mode
-
Run the script without setting credentials. It prompts you for your username and password:
You can also pin a specific version:./install-vpctl.sh latest./install-vpctl.sh 0.3.1 -
Enter your credentials at the prompt:
[install-vpctl] Logging in to uccmpprivatecloud.azurecr.io (interactive)...[install-vpctl] Please enter your registry credentials:Username: <your-username>Password: <your-password>
Non-interactive mode for CI and automation
For automated environments, set bothORAS_USERNAMEORAS_PASSWORDYou can also pin a specific version:export ORAS_USERNAME="<your-username>"export ORAS_PASSWORD="<your-password>"./install-vpctl.sh latest
export ORAS_USERNAME="<your-username>"export ORAS_PASSWORD="<your-password>"./install-vpctl.sh 0.3.1
Custom installation directory
Specify a custom installation directory as the second argument:./install-vpctl.sh latest /opt/bin
Script actions
The script performs the following actions:- Auto-detects your platform (/
linux/darwin) and architecture (windows/amd64).arm64 - Checks whether the CLI is installed and prompts you to install it if needed.
oras - Authenticates to the registry by using interactive or non-interactive mode based on environment variables.
- Downloads and extracts the correct vpctl binary.
- Installs it to or the directory you specify.
/usr/local/bin - Verifies the installation by running .
vpctl version
Environment variables
Variable | Required | Default | Description |
|---|---|---|---|
| No* | - | Registry username (for non-interactive mode) |
| No* | - | Registry password (for non-interactive mode) |
| No | | Registry URL |
ORAS_USERNAMEORAS_PASSWORDConfigure registry credentials
Before you can pull releases, configure your registry credentials.-
Run the interactive configuration command:
The command prompts you for:vpctl configure- Username
- Password
. To configure credentials for a different registry, pass it as a positional argument:uccmpprivatecloud.azurecr.io. This securely stores credentials in your home directory.vpctl configure set <registry-url> -
Alternatively, use the non-interactive configuration command (registry is a positional argument, defaults to ):
uccmpprivatecloud.azurecr.iovpctl configure set <registry-url> --username <username> --password <password>
View configuration
vpctl configure get
Delete credentials
The registry argument is positional and defaults touccmpprivatecloud.azurecr.iovpctl configure delete <registry-url>