Install vpctl
Install the vpctl command-line tool, configure registry credentials, and review external CLI requirements.
読み終わるまでの所要時間 3 分最終更新 1日前
Unity provides as part of your on-premises onboarding package. Once you have the script, run:
install-vpctl.sh./install-vpctl.sh latest
This 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.
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 |
All other vpctl commands run without external CLI dependencies.
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:./install-vpctl.sh latestYou can also pin a specific version:./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 both and environment variables:
ORAS_USERNAMEORAS_PASSWORDexport ORAS_USERNAME="<your-username>"export ORAS_PASSWORD="<your-password>"./install-vpctl.sh latest
You can also pin a specific version:
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 |
* Both and must be set together for non-interactive mode, or both unset for interactive mode.
ORAS_USERNAMEORAS_PASSWORDConfigure registry credentials
Before you can pull releases, configure your registry credentials.
-
Run the interactive configuration command:vpctl configureThe command prompts you for:
- Username
- Password
The registry defaults to. To configure credentials for a different registry, pass it as a positional argument:uccmpprivatecloud.azurecr.io.vpctl configure set <registry-url>This securely stores credentials in your home directory. -
Alternatively, configure credentials non-interactively. The registry argument is positional and defaults to. You can provide the password by using one of the following methods, listed from most to least secure for automation:
uccmpprivatecloud.azurecr.io
--password-stdin--password-stdinecho "$REGISTRY_PASSWORD" | vpctl configure set <registry-url> --username "$REGISTRY_USERNAME" --password-stdin
Use the environment variable together with to supply the credentials through environment variables when piping isn't convenient:
VPCTL_PASSWORDVPCTL_USERNAMEexport VPCTL_USERNAME=<username>export VPCTL_PASSWORD=<password>vpctl configure set <registry-url>
Use to pass the password as a flag. This option is available only for backward compatibility and isn't recommended:
--passwordvpctl configure set <registry-url> --username <username> --password <password>
You can't use and together. If you don't specify either option, prompts you for the password interactively. If stdin isn't a terminal and isn't set, the command exits with an error instead of hanging.
--password--password-stdinvpctlVPCTL_PASSWORDView configuration
vpctl configure get
Delete credentials
The registry argument is positional and defaults to :
uccmpprivatecloud.azurecr.iovpctl configure delete <registry-url>