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.
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.
-
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
-
From a browser, sign in to the Compute Web UI.
-
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.
-
In the Resources section of your user details page, select API Keys, and then select the Add API Key button.
-
Navigate to the location of your public key or paste the public key contents and then select Upload Key.
-
In your
/home/username/.oci
directory, create a file namedconfig
. 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?