oracle / oracle/oci-cli

honor `OCI_CLI_PROFILE` in `oci session authenticate`

Open Beginner friendly
#1,091 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
669
Forks
236
Avg merge
1m
Merged PRs (30d)
4

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Python entry point for oci session authenticate and trace how --profile-name and OCI_CLI_PROFILE are resolved. Verify that setting only the environment variable avoids the prompt and that the generated config and example command use that profile name.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.