Error:
oci is a command line interface for Oracle Cloud Infrastructure tasks; it performs the same functions/functionality as Console. CLI is built on Python, which makes calls to OCI API Calls. During the configuration/setup of CLI on Windows 10 OS, I faced the captioned issue and was clueless, as i couldn’t proceed further.
ERROR: The config file at ~\.oci\config is invalid:
+Config Errors+———+———————————————————————————-+
| Key | Error | Hint |
+————-+———+———————————————————————————-+
| tenancy | missing | log into the console and find this OCID at the bottom of any page |
| key_file | missing | the full path and filename of the private PEM key file |
| fingerprint | missing | openssl rsa -pubout -outform DER -in <path to your private key> | openssl md5 -c |
| user | missing | log into the console and go to the user’s settings page to find their OCID |
| region | missing | for example, us-phoenix-1 |
+————-+———+———————————————————————————-+
Resolution:
I really couldn’t figure out what really made this error to show-up; but could resolve this issue by creating a new configuration file and update the PEM public keys in the Console. (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/apisigningkey.htm#Other)
And also by passing the values of compartment-id, config-file as below.
oci os bucket list –config-file=C:\Oracle\cli\config\config –compartment-id=ocid1.compartment
.oc1.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thank you, I will try your solution. The same happened to me. The extrange was the same config configuration is running in another project which finalize without problems
LikeLike