Getting an error when I try creating a share for storage account using Azure CLI

Sudheer Thokala 1 Reputation point
2021-03-15T03:47:16.307+00:00

when I run

az storage share create \
--account-name masked123s \
--account-key <Removed key for security reasons> \
--name data \
--quota 1024 \
--output none

Error :Client-Request-ID=8a6fc0d8-8540-11eb-97bf-acd98232323 Retry policy did not allow for a retry: , HTTP status code=Unknown, Exception=HTTPSConnectionPool(host='masked123s.file.core.windows.net', port=443): Max retries exceeded with url: /data?restype=share (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))).
HTTPSConnectionPool(host='masked123s.file.core.windows.net', port=443): Max retries exceeded with url: /data?restype=share (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,722 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sumarigo-MSFT 43,806 Reputation points Microsoft Employee
    2021-03-16T08:20:42.537+00:00

    @Sudheer Thokala Welcome to Microsoft Q&A, Thank you for posting your query here!
    Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused.

    I was able to repro the issue in my lab in both CLI and Cloud shell, I was able to create File Share

    78135-wewewe.gif

    You need to edit the file: "C:\path_to_your_cli_installation\CLI2\Lib\site-packages\certifi\cacert.pem" and add the certificate of your proxy server
    You need to set the environment variable REQUESTS_CA_BUNDLE to "C:\path_to_your_cli_installation\CLI2\Lib\site-packages\certifi\cacert.pem"

    You can also refer to this GitHub article: https://github.com/Azure/azure-cli/blob/dev/doc/use_cli_effectively.md#working-behind-a-proxy

    Hope this helps!

    Kindly let us know if the above helps or you need further assistance on this issue.

    ------------------------------------------------------------------------------------------------------------------------

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments