init

Use the init command to initialize the Conjur Cloud CLI with your Conjur Cloud endpoint.

The init command creates a configuration file (.conjurrc) that contains the details for connecting to Conjur Cloud. This file is located under the user's root directory.

Usage

 
conjur [global options] init [options] [args]

Global options

Option

Description

-d, --debug

Enable debugging output.

Options

Option

Description

-u VALUE, --url VALUE

Provide the Conjur Cloud endpoint.

If you do not provide a URL, you are prompted to provide one.

-c VALUE, --ca-cert VALUE

(Optional) Provide the full path to the Conjur root CA certificate.

If this option is not provided, the Conjur Cloud CLI uses the operating system's trusted System Roots certificate store.

Limitation: On RHEL 7, the Conjur Cloud CLI cannot access the trusted System Roots certificate store, so the init command must explicitly include the --ca-cert option, for example, --ca-cert /etc/pki/tls/certs/ca-bundle.crt.

--force

(Optional) Force overwrite of existing files.

-p VALUE, --proxy VALUE

If your organization requires communication through a proxy server, include the URL of the proxy server in the following format:

  • HTTP proxy server: http://<proxy server IP address or name>:<proxy_port>

  • HTTPS proxy server: https://<proxy server IP address or name>:<proxy_port>

Required if your organization requires communication through a proxy server.

-h, --help

(Optional) Display the help screen.

Examples

  • The following command initializes the Conjur Cloud CLI with the Conjur Cloud server endpoint, and creates the necessary configuration file (.conjurrc):

    conjur init -u https://<subdomain>.secretsmgr.cyberark.cloud/api
  • The following command prompts for the URL of your Conjur Cloud tenant:

    conjur init
  • The following command prompts for the URL of your Conjur Cloud tenant and routes traffic through the proxy server:

    conjur init -u <conjur url> -p https://my-secure-proxy-host:443
  • The following command initializes the Conjur Cloud CLI with the Conjur Cloud tenant endpoint using the Conjur root CA certificate file:

    conjur init –url https://<subdomain>.secretsmgr.cyberark.cloud/api --ca-cert ~/conjur_ca.pem