0
votes

I'm trying to upload a file to my azure storage. I did

$ set AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=**;AccountKey=** 

but when I did

$ azure storage blob upload PATHFILE mycontainer data/book_270.pdf

then I got the following error:

info: Executing command storage blob upload error: Please set the storage account parameters or one of the following two environment variables to use the storage command.

  1. AZURE_STORAGE_CONNECTION_STRING
  2. AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY

info: Error information has been recorded to /Users/uqtngu83/.azure/azure.err

error: storage blob upload command failed

But I already set AZURE_STORAGE_CONNECTION_STRING! Please help

1
Did you restart your session after you set the Environment Variable? - Jack Zeng
Sorry this was a very silly mistake. In Mac, it should be: $ export AZURE_STORAGE_CONNECTION_STRING="DefaultBlaBlaBla". Problem solved! - Huyen Nguyen

1 Answers

0
votes

As suggested in comment, you are suppose to run the following on your MAC terminal. (Change Defaultblabla with your Azure Storage Connection String)

export AZURE_STORAGE_CONNECTION_STRING="DefaultBlaBlaBla"