Skip to main content
Only two NexusOne command-line tool requires setting up authentication manually, and that’s the nx1 and the Kyuubi batch submit tool.

nx1

The nx1 tool supports three authentication methods. If you configure more than one, then NexusOne applies priority in the following order:
  1. Command-line options
  2. Environment variables
  3. Profile

Command-line options

The command-line options authentication method passes authentication values directly to the nx1 command at runtime. The names of the command-line options include:
  • --api_key: API key
  • --host: API host
To use this method, take the following steps:
  1. Get your API key.
  2. Run the nx1 command and include both options.

Environment variables

The environment variables authentication method uses variables configured on the command line. The required variables include:
  • NX1_API_KEY: API key
  • NX1_HOST: API host
To use this method, take the following steps:
  1. Get your API key.
  2. Set the environment variables.
  3. Run the nx1 command.

Profile

The profile authentication method uses a configuration file stored in a default directory. The file contains details of different profiles. Profiles can represent different environments, such as development, staging, and production. They allow you to store multiple credentials and switch between them easily without re-entering your credentials. The default NexusOne directory is the following:
The file contents are in YAML format and follow this structure.
To use this method, take the following steps:
  1. Get your API key.
  2. Create the new directory and file.
  3. Add a default profile.
    This adds your credentials to the ~/.nx1/profiles file.

Kyuubi batch submit

The Kyuubi batch submit tool supports three authentication methods. If you configure more than one, then NexusOne applies priority in the following order:
  1. Command-line options
  2. YAML config
  3. Environment variable
  4. Interactive prompt

Command-line options

The command-line options authentication method passes authentication values at runtime. The names of the command-line options include:
  • --username: Kyuubi username
  • --password: Kyuubi password
To use this option, take the following steps:
  1. Clone the kyuubi-submit GitHub repository.
  2. Install dependencies and requirements.
  3. Make the Kyuubi script executable.
  4. Run the kyuubi_submit.py script and include both options.

YAML config

The YAML config authentication method uses a configuration file. The file contains details about your credentials, including additional details you would normally pass to the command line, such as:
  • Resource
  • Classname
  • Args
  • Jars
The following code shows a full sample of the additional details:
To use this option, take the following steps:
  1. Clone the kyuubi-submit GitHub repository.
  2. Install dependencies and requirements.
  3. Make the Kyuubi script executable.
  4. Create the config file.
  5. Run the Kyuubi script and include the config file.
  6. To optionally override YAML values, pass the options.

Environment variable

The environment variable authentication method uses a variable configured on the command line. It requires the following variable:
  • KYUUBI_SUBMIT_PASSWORD: Kyuubi password
To use this option, take the following steps:
  1. Clone the kyuubi-submit GitHub repository.
  2. Install dependencies and requirements.
  3. Make the Kyuubi script executable.
  4. Set the environment variable.
  5. Run the Kyuubi script command.

Interactive prompt

The interactive prompt authentication method expects you to always enter your Kyuubi password each time you run a command. To use this option, take the following steps:
  1. Clone the kyuubi-submit GitHub repository.
  2. Install dependencies and requirements.
  3. Make the Kyuubi script executable.
  4. Run the kyuubi_submit.py script without including the --password option.
  5. When prompted to enter a password, enter your password.