ERROR: The specifed resource name contains invalid characters. ErrorCode: InvalidResourceName

Mahesh Kumar picture Mahesh Kumar · Oct 31, 2019 · Viewed 8.3k times · Source

ERROR: The specifed resource name contains invalid characters. ErrorCode: InvalidResourceName

2019-10-31T10:28:17.4678189Z <?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidResourceName</Code><Message>The specifed resource name contains invalid characters.

2019-10-31T10:28:17.4678695Z RequestId:

2019-10-31T10:28:17.4679207Z Time:2019-10-31T10:28:17.4598301Z</Message></Error>

I am trying to deploy my static website to blob storage in azure with azure DevOps, but I am getting this error. In my pipeline, I am using grunt build to build, and archive it to zip, then publishing to the azure pipeline, then in the release, I am extracting files, and trying to upload these files with azure CLI task.

I am using following command az storage blob upload-batch --account-name something --account-key something --destination ‘$web’ --source ./

My Container name is $web

Answer

Luk&#225;š Šefč&#237;k picture Lukáš Šefčík · Dec 3, 2019

I solved this problem by removing apostrophes around container name: az storage blob upload-batch --account-name something --account-key something --destination $web --source ./