To upload the build artifacts to the blob container I used the task Azure file copy. But an error occurred :
0.0 %, 0 Done, 0 Failed, 1 Pending, 0 Skipped, 1 Total,
INFO: Authentication failed, it is either not correct, or expired, or does not have the correct permission -> github.com/Azure/azure-storage-blob-go/azblob.newStorageError, /home/vsts/go/pkg/mod/github.com/!azure/azure-storage-blob-go@v0.10.1-0.20201022074806-8d8fc11be726/azblob/zc_storage_error.go:42
===== RESPONSE ERROR (ServiceCode=AuthorizationPermissionMismatch) =====
Description=This request is not authorized to perform this operation using this permission.
RequestId:ae545517-501e-00ce-0798-ea489e000000
Time:2021-12-06T11:54:25.0571292Z, Details:
Code: AuthorizationPermissionMismatch
PUT mybloburl?blockid=YjA4YjIzN2UtODJhMC1mMjQzLTUwOGYtNmYxNDcwOGJjZmY0&comp=block&timeout=901
Authorization: REDACTED
Content-Length: [8388608]
User-Agent: [TFS_useragent AzCopy/10.8.0 Azure-Storage/0.10 (go1.13; Windows_NT)]
X-Ms-Client-Request-Id: [65465-83ea-4410-450e-dd5b722b6cb3]
X-Ms-Version: [2019-12-12]
--------------------------------------------------------------------------------
RESPONSE Status: 403 This request is not authorized to perform this operation using this permission.
The YAML file content I used for this task:
steps:
- task: AzureFileCopy@4
displayName: 'AzureBlob File Copy'
inputs:
SourcePath: '$(Build.ArtifactStagingDirectory)/myfile.zip'
azureSubscription: 'my-azure-connection'
Destination: AzureBlob
storage: mystorage
ContainerName: mycontainer
Can someone help me with this issue?