You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The oci command raises a generic error 401 NotAuthenticated, if the .pem files for the key pair contain Windows style line breaks (CR+LF). It would be desirable for the error message to specifically point out that the carriage return characters must not be present and prompt user to use line feed character only.
Alternatively, the command could accept the Windows style by treating the CR+LF pairs as if they were LF alone.
dchiba@DCHIBA-FOOBAR3 MINGW64 ~/.oci
$ oci os ns get
ServiceError:
{
"client_version": "Oracle-PythonSDK/2.112.1, Oracle-PythonCLI/3.33.1",
"code": "NotAuthenticated",
"logging_tips": "Please run the OCI CLI command using --debug flag to find more debug information.",
"message": "The required information to complete authentication was not provided.",
"opc-request-id": "foo-1:yCjGuV1rB5ZsrZYnYSA7aqMxzZ9dsn3dOSMMnDzXlE7FWxmV61N6ucthrXJilIJM",
"operation_name": "get_namespace",
"request_endpoint": "GET https://objectstorage.us-phoenix-1.oraclecloud.com/n",
"status": 401,
"target_service": "object_storage",
"timestamp": "2024-03-13T17:01:00.753459+00:00",
"troubleshooting_tips": "See [https://docs.oracle.com/iaas/Content/API/References/apierrors.htm] for more information about resolving this error. If you are unable to resolve this issue, run this CLI command with --debug option and contact Oracle support and provide them the full error message."
}
The oci command raises a generic error 401 NotAuthenticated, if the .pem files for the key pair contain Windows style line breaks (CR+LF). It would be desirable for the error message to specifically point out that the carriage return characters must not be present and prompt user to use line feed character only.
Alternatively, the command could accept the Windows style by treating the CR+LF pairs as if they were LF alone.
dchiba@DCHIBA-FOOBAR3 MINGW64 ~/.oci
$ oci os ns get
ServiceError:
{
"client_version": "Oracle-PythonSDK/2.112.1, Oracle-PythonCLI/3.33.1",
"code": "NotAuthenticated",
"logging_tips": "Please run the OCI CLI command using --debug flag to find more debug information.",
"message": "The required information to complete authentication was not provided.",
"opc-request-id": "foo-1:yCjGuV1rB5ZsrZYnYSA7aqMxzZ9dsn3dOSMMnDzXlE7FWxmV61N6ucthrXJilIJM",
"operation_name": "get_namespace",
"request_endpoint": "GET https://objectstorage.us-phoenix-1.oraclecloud.com/n",
"status": 401,
"target_service": "object_storage",
"timestamp": "2024-03-13T17:01:00.753459+00:00",
"troubleshooting_tips": "See [https://docs.oracle.com/iaas/Content/API/References/apierrors.htm] for more information about resolving this error. If you are unable to resolve this issue, run this CLI command with --debug option and contact Oracle support and provide them the full error message."
}
dchiba@DCHIBA-FOOBAR3 MINGW64 ~/.oci
$ cp oci_api_public_key.pem.LFalone oci_api_public_key.pem
dchiba@DCHIBA-FOOBAR3 MINGW64 ~/.oci
$ cp oci_api_key.pem.LFalone oci_api_key.pem
dchiba@DCHIBA-FOOBAR3 MINGW64 ~/.oci
$ oci os ns get
{
"data": "foobarbazbiz"
}
dchiba@DCHIBA-FOOBAR3 MINGW64 ~/.oci
$ ll pem
-rw-r--r-- 1 dchiba 197121 1679 Mar 13 10:01 oci_api_key.pem
-rw-r--r-- 1 dchiba 197121 1706 Sep 20 11:46 oci_api_key.pem.CRLF
-rw-r--r-- 1 dchiba 197121 1679 Mar 13 09:58 oci_api_key.pem.LFalone
-rw-r--r-- 1 dchiba 197121 451 Mar 13 10:01 oci_api_public_key.pem
-rw-r--r-- 1 dchiba 197121 460 Mar 12 16:50 oci_api_public_key.pem.CRLF
-rw-r--r-- 1 dchiba 197121 451 Mar 13 09:58 oci_api_public_key.pem.LFalone
dchiba@DCHIBA-FOOBAR3 MINGW64 ~/.oci
The text was updated successfully, but these errors were encountered: