Configuring the OCI CLI

On Private Cloud Appliance, before using the OCI CLI, you must configure it for working with Private Cloud Appliance and obtain the system's certificate authority (CA) chain. You can complete the configuration manually or use the config setup tool to help you.

Important

If you're already using the OCI CLI and have it configured for other purposes, read this section entirely before proceeding with any of the configuration steps.

Obtain the Required Information

Whether you manually configure the OCI CLI or use the setup config tool, there is required information you must provide for the configuration file. Before you begin the configuration process, ensure you have the following:

  • User OCID

    The user's OCID is in ocid1.user.unique_ID format. You can copy the user's OCID from the user details page in the Compute Web UI. To navigate to your user details page, select your user name in the Compute Web UI dashboard and then select My Profile.

  • Tenancy OCID

    The tenancy OCID is in ocid1.tenancy..unique_ID format. You can copy the tenancy OCID from the tenancy details page in the Compute Web UI. To navigate to the tenancy details page, select your username in the Compute Web UI dashboard and then select Tenancy.

  • Region name

    The region name is in pcasys1.example.com format, where pcasys1 is the name of your Private Cloud Appliance and example.com is your domain.

    If you have access to the Service Web UI, you can find the system and domain names on the dashboard. Otherwise, ask a Service Web UI administrator for the information.

If you don't already have an existing API public and private key pair, we recommend that you create them as part of the manual or automated OCI CLI configuration. For more information, see Using the Automated Configuration Method or Manually Configuring the OCI CLI.

If you have an existing API public and private key pair that you want to use, ensure they meet the following requirements:

  • They're in PEM format.

  • Your public key is added to your user profile.

  • You know the full path and file name of the private key. For example, ~/.oci/oci_api_key.pem .

  • You have your public key fingerprint, which is in xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx format. You can find this fingerprint on your profile page in the Compute Web UI or through a terminal using a command. For example:

    openssl rsa -pubout -outform DER -in ~/.oci/oci_api_key.pem | openssl md5 -c