Troubleshooting installation of the CLI

If you have trouble installing the secrethub CLI, you’re in the right place!

The error code below usually indicates the binary is installed in a location that is not included in your PATH variable.

# on Linux/macOS
command not found: secrethub

# on Windows
“secrethub” is not recognized as an internal or external command, operable program or batch file. 

Changing the installation path

On Windows, the installer installs the SecretHub CLI to %ProgramFiles%\SecretHub by default. To change the install location, you can add -InstallPath <path> to the install command. The example below illustrates how to install the SecretHub CLI to a custom location:

# Download the script first.
iwr https://get.secrethub.io/windows > ./install-secrethub.ps1

# Execute the script with your location configured.
./install-secrethub.ps1 -InstallPath "C:\Program Files\My-Custom-SecretHub-Install-Directory"