Skip to main content

Sonatype CLI Binaries

The CLI binary versions are a drop-in replacement for the Java version without the Java runtime environment requirements. The parameters are the same as the Java CLI versions with the addition of Secure Sockets Layer (SSL) customizations.

The native binary versions of the Sonatype IQ CLI are available for direct download on the main IQ Download and Compatibility page next to the JAR version.

Linux

The Linux CLI can be installed on distributions supporting deb or rpm packages:

Debian/Ubuntu

  1. Download the public GPG signing key and add the key to your apt source keyring

    wget -qO- https://repo.sonatype.com/repository/sonatype-hosted/pki/deb-gpg/GPG-KEY-sonatype-apt-hosted.asc | \
       gpg --dearmor | \
       sudo tee /usr/share/keyrings/sonatype-apt-hosted.gpg >/dev/null
  2. Add the repository to your sources. They may be added manually or automatically.

    Manually create file: /etc/apt/sources.list.d/sonatype-hosted.list

    deb [signed-by=/usr/share/keyrings/sonatype-apt-hosted.gpg arch=amd64] https://repo.sonatype.com/repository/sonatype-apt-hosted/ stable main

    Automatic call to add sources.

    sudo wget -P /etc/apt/sources.list.d/ https://repo.sonatype.com/repository/sonatype-hosted/deb/sonatype-hosted.list
  3. Install the application via apt-get.

    sudo apt-get update && sudo apt-get install nexus-iq-cli

Red Hat/CentOS

  1. Add the repository to your sources.

    Manually create /etc/yum.repos.d/sonatype-hosted.repo

    [sonatype-hosted]
    name=Sonatype Hosted
    baseurl=https://repo.sonatype.com/repository/sonatype-yum-hosted/
    enabled=1
    gpgcheck=1
    gpgkey=https://repo.sonatype.com/repository/sonatype-hosted/pki/rpm-gpg/RPM-GPG-KEY-Sonatype-yum.asc
    priority=1 

    Or automatically:

    sudo wget -P /etc/yum.repos.d/ https://repo.sonatype.com/repository/sonatype-hosted/rpm/sonatype-hosted.repo
  2. Install the application via yum (or dnf). The first time you install the package you will be prompted to install the GPG signing key.

    sudo yum install nexus-iq-cli

Mac/Homebrew

The Mac CLI can be installed via the Homebrew package manager like so:

brew tap sonatype/nexus-iq-cli
brew install --cask nexus-iq-cli

Command to run on Linux or Mac OS

./nexus-iq-cli

Windows

Command to run on Windows

nexus-iq-cli.exe

SSL Parameters

The JAR version of the CLI uses the standard approach to SSL that is found in all Java applications. Namely, the

-Djavax.net.ssl.trustStore and-Djavax.net.ssl.keyStore-Djavax.net.ssl.keyStore family of options.

For those native binaries, we must explicitly pass in the equivalent values via additional parameters:

--ssl-key-store-password

Password for custom SSL key store (equivalent to -Djavax.net.ssl.keyStorePassword JVM property)

--ssl-key-store-path

Path to custom SSL key store (equivalent to -Djavax.net.ssl.keyStore-Djavax.net.ssl.keyStore JVM property)

--ssl-key-store-type

Type of custom SSL key store (equivalent to -Djavax.net.ssl.keyStoreType-Djavax.net.ssl.keyStoreType JVM property)

--ssl-trust-store-password

Password for custom SSL trust store (equivalent to -Djavax.net.ssl.trustStorePassword-Djavax.net.ssl.trustStorePassword JVM property)

--ssl-trust-store-path

Path to custom SSL trust store (equivalent to -Djavax.net.ssl.trustStore-Djavax.net.ssl.trustStore JVM property)

--ssl-trust-store-type

Type of custom SSL trust store (equivalent to -Djavax.net.ssl.trustStore-Djavax.net.ssl.trustStore JVM property)