Skip to content

honor OCI_CLI_PROFILE in oci session authenticate #1091

Open

Description

@scratchmex

when doing

export OCI_CLI_PROFILE=oc1.ssh
oci session authenticate --region <region>

it still asks you for the profile name

...
Enter the name of the profile you would like to create:

so OCI_CLI_PROFILE should set --profile-name to get a flow like this

❯ oci session authenticate --region us-ashburn-1 --profile-name oc1.ssh
...
Config written to: /Users/ivang/.oci/config

    Try out your newly created session credentials with the following example command:

    oci iam region list --config-file /Users/ivang/.oci/config --profile oc1.ssh

Activity

  1. riyaKaushik576 commented on Jul 9, 2026

    @riyaKaushik576

    Hi @scratchmex! Thank you for bringing this to our attention, we will be working on this internally

  2. PechimuthuMithil commented on Jul 14, 2026

    @PechimuthuMithil
    Member

    Hello @scratchmex !
    The OCI_CLI_PROFILE env var is intended to specify which profile OCI CLI should load from config when executing CLI commands. For oci session authenticate, however, the command is responsible for creating or updating a profile. Since the profile name can already be provided explicitly via the --profile-name option, supporting OCI_CLI_PROFILE in this command would not provide additional functionality. Once the profile has been created, OCI_CLI_PROFILE can then be used to select that profile when running subsequent OCI CLI commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions