TheKoguryo's Tech Blog

 Version 2024.04.01

Warning

This content has been generated by machine translation. The translations are automated and have not undergone human review or validation.

14.1.1.3 Config File Setting

  1. Pre-check the information you need for setup

    • user OCID

      Click User Settings in the user profile in the upper right corner and check the user OCID

      image-20220118104730184

      image-20220118103801159

    • Tenancy OCID

      Click Tenancy in the user profile in the upper right corner and check the Tenancy OCID

      image-20220118104814076

      image-20220118104020266

    • Region: Region to use

    • API Signing Key: For convenience, we will choose to create a new private key and public key.

  2. Run setup config

    oci setup config
    
    • Execution example
    [opc@bastion-host ~]$ oci setup config
        This command provides a walkthrough of creating a valid CLI config file.
    ...
    Enter a location for your config [/home/opc/.oci/config]:
    Enter a user OCID: ocid1.user.oc1..aaaaaaaazo6ilmezdaeozjcmsu6rcxnf5sjz2fau76kpdjvsbbakhqn35azq
    Enter a tenancy OCID: ocid1.tenancy.oc1..aaaaaaaamd5zq7ohrxkmcsai23pp634k6i2eymnznv4d6ur7n5n4qjr7vnta
    Enter a region by index or name(e.g.
    1: ap-chiyoda-1, 2: ap-chuncheon-1, 3: ap-hyderabad-1, 4: ap-ibaraki-1, 5: ap-melbourne-1,
    6: ap-mumbai-1, 7: ap-osaka-1, 8: ap-seoul-1, 9: ap-singapore-1, 10: ap-sydney-1,
    11: ap-tokyo-1, 12: ca-montreal-1, 13: ca-toronto-1, 14: eu-amsterdam-1, 15: eu-frankfurt-1,
    16: eu-marseille-1, 17: eu-zurich-1, 18: il-jerusalem-1, 19: me-dubai-1, 20: me-jeddah-1,
    21: sa-santiago-1, 22: sa-saopaulo-1, 23: sa-vinhedo-1, 24: uk-cardiff-1, 25: uk-gov-cardiff-1,
    26: uk-gov-london-1, 27: uk-london-1, 28: us-ashburn-1, 29: us-gov-ashburn-1, 30: us-gov-chicago-1,
    31: us-gov-phoenix-1, 32: us-langley-1, 33: us-luke-1, 34: us-phoenix-1, 35: us-sanjose-1): 8
    Do you want to generate a new API Signing RSA key pair? (If you decline you will be asked to supply the path to an existing key.) [Y/n]:
    Enter a directory for your keys to be created [/home/opc/.oci]:
    Enter a name for your key [oci_api_key]:
    Public key written to: /home/opc/.oci/oci_api_key_public.pem
    Enter a passphrase for your private key (empty for no passphrase):
    Private key written to: /home/opc/.oci/oci_api_key.pem
    Fingerprint: a0:e1:fe:79:22:22:f0:b5:6b:29:72:5f:5d:b6:22:32
    Config written to /home/opc/.oci/config
    
    
        If you haven't already uploaded your API Signing public key through the
        console, follow the instructions on the page linked below in the section
        'How to upload the public key':
    
            https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#How2
    


As an individual, this article was written with my personal time. There may be errors in the content of the article, and the opinions in the article are personal opinions.

Last updated on 18 Jan 2022