question

Sudh33r avatar image
0 Votes"
Sudh33r asked ·

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

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
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Sumarigo-MSFT avatar image
0 Votes"
Sumarigo-MSFT answered ·

@Sudh33r 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.





wewewe.gif (111.3 KiB)
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.