This topic describes how to resolve issues that you might encounter when installing Python or the CLI, or when using the CLI.
Installation Errors
If you see an error similar to this when installing with pip:
Could not fetch URL https://pypi.org/simple/oci-cli/: There was a problem confirming the ssl certificate:
HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/oci-cli/ (Caused by
SSLError(SSLError(1, '[SSL:
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:877)'),)) - skipping
Your machine may not be connected to external internet, or your network settings are
blocking access to pypi. Consult with your network administrator to fix your network
settings, or try performing an Offline Installation or using the Container Image.
Upgrade Errors 🔗
If you are seeing an outdated version number after performing a CLI upgrade, you should
try uninstalling the previous version of the CLI.
You can find the package locations using the
command:
oci setup find-installations
Note
Note that this command is not available in CLI versions 3.4.0
and earlier.
Remove the packages listed by the command above using the
instructions in Uninstalling the CLI, and then install the
latest OCI CLI version following the instructions for your environment found in the
Quickstart.
Service Errors 🔗
Any operation resulting in a service error causes an error of type
"ServiceError" to be returned by the CLI. For information about common service
errors that Oracle Cloud Infrastructure returns, see API Errors.
401 Error - Not Authenticated
A service error has a status of 401 and a code of
NotAuthenticated might indicate an invalid configuration
file.
Set an environment variable so the CLI can find your local certification. For
example:
export REQUESTS_CA_BUNDLE=${CERT_PATH}
Certification Verify Failed Using a Certification in an Instance
A CERTIFICATE_VERIFY_FAILED exception might indicate that the CLI
cannot find the additional certification your operation requires. In some cases, the
certification file may already be provisioned in the host.
To resolve this, set the location of your certification in an environment variable
for the CLI to
use:
If the certification file was not provisioned in the host, locate your certification
file within the instance and set the variable to the correct path. For
example:
If your machine
is running a macOS variant of python 3.6 or 3.7, and you see the following message
despite setting your certification path
correctly:
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1051)>
ERROR: Failed to download virtualenv package. Please check that your trusted certificates are up to date and include the certificates necessary to verify github.com
To
resolve this, locate and run the Certificates.command file. Your command may look
like::
Run
the CLI installer after the Certificates command runs successfully.
Oracle Linux Permissions Issues 🔗
On Oracle Linux 7.3, if you encounter permission issues when running pip install, you
might need to use sudo.
oci Command Not Found 🔗
If the oci command isn't found, this can be caused by one of the following reasons:
pip installed the package to a different virtual environment than your active one.
You switched to a different active virtual environment after you installed the CLI.
To determine where the CLI is installed, run the which pip and
which oci commands.
Wheel File Won't Install 🔗
If the wheel file won't install, verify that pip is up to date. To update pip, run the pip install -U pip command. Try to install the wheel again.
Windows Issues 🔗
If the oci command isn't found, make sure that the oci.exe location is in your path (for example, the Scripts directory in your Python installation).
No Matching Distribution Found 🔗
Error: No matching distribution found for oci-cli==3.x.x
This error occurs if you are attempting to install the CLI in a Python 2 environment.
Support for Python 2 was deprecated as of August 1, 2021.
To resolve this issue, update your Python to version 3.6.5 or later. If you
require Python 2, any CLI version starting with 2.x.x will still support Python 2.
Silent Data Corruption Using put Command 🔗
Issue: Users using the oci os object put command with data from STDIN
might see silent data corruption in FIPS mode or in an environment which uses a
FIPS-compliant OpenSSL version. The CLI reports that the upload operation was
successful, but no data is uploaded.
To mitigate this issue, update the OCI CLI version to 3.4.1 or greater.
If you want to search for an issue not listed here, contribute ideas, report a bug, get
notified about updates, or have questions or feedback, use one of the following
links.
Contributions
Got a fix for a bug, or a new feature you'd like to contribute? The CLI is open source and accepting pull requests on GitHub.
Notifications
To be notified when a new version of the CLI is released, subscribe to the Atom feed.
Questions or Feedback
Ways to get in touch:
GitHub: To search for issues or to file bugs and
feature requests.