我正在尝试使用此脚本将一些 zip 文件上传到 Azure blob 存储:
#!/bin/bash
# Sample script to upload a file to a BLOB container
if [ $# -eq 0 ]
then
echo "Please specify a filename"
exit 1
fi
# Required parameters
file_name=$1
azure_account=xxx
azure_key=xxx
container_name=xxx
blob_name=xxx
# Used by azure-cli
export AZURE_STORAGE_ACCOUNT=$azure_account
export AZURE_STORAGE_ACCESS_KEY=$azure_key
azure storage blob upload $file_name $container_name $blob_name
但是每当我运行它时,我都会得到:
sh upload-file.sh file.zip info: Executing command storage blob upload error: Cannot call method 'substr' of null info: 错误信息已记录到/home/usr/.azure/azure.err error:
storage blob upload命令失败