Manually Configuring the OCI CLI

Complete the following steps to manually configure the OCI CLI for Private Cloud Appliance. Ensure you have gathered all the required information.

Note

Alternatively, you can use the automated method to configure the OCI CLI. See Using the Automated Configuration Method.

The steps below assume you're on a Linux system and that you have already created a user through the Compute Web UI. However, the basic procedure is the same for other OSs.

  1. From a terminal, log into the system where you installed the OCI CLI and create an API key pair. For example:

    oci setup keys
    Enter a passphrase for your private key (empty for no passphrase):
    Public key written to: /home/username/.oci/oci_api_key_public.pem
    Private key written to: /home/username/.oci/oci_api_key.pem
    Public key fingerprint: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
  2. From a browser, sign in to the Compute Web UI.

  3. Navigate to your user details page. Select your username in the top right of the page, and then select My Profile. Your user details page is displayed.

  4. In the Resources section of your user details page, select API Keys, and then select the Add API Key button.

  5. Navigate to the location of your public key or paste the public key contents and then select Upload Key.

  6. In your /home/username/.oci directory, create a file named config. Add a profile section with the required information:

    [PCA1]
    user=ocid1.user...unique_id
    key_file=/home/username/.oci/oci_api_key.pem
    tenancy=ocid1.tenancy.unique_ID
    region=pcasys1.example.com
    fingerprint=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx

    In this example, 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.

What's Next?

See Obtaining the Certificate Authority Bundle.