{"record":{"id":"097a1a4f1e259980","repo":"goreleaser/goreleaser","slug":"missing-azure-storage-key-for-provided-bucket-s","errorCode":null,"errorMessage":"missing azure storage key for provided bucket %s: %w","messagePattern":"missing azure storage key for provided bucket (.+?): %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pipe/blob/upload.go","lineNumber":225,"sourceCode":"\treturn false\n}\n\nfunc handleError(err error, url string) error {\n\tswitch {\n\tcase errorContains(err, \"NoSuchBucket\", \"ContainerNotFound\", \"notFound\"):\n\t\treturn fmt.Errorf(\"provided bucket does not exist: %s: %w\", url, err)\n\tcase errorContains(err, \"NoCredentialProviders\"):\n\t\treturn fmt.Errorf(\"check credentials and access to bucket: %s: %w\", url, err)\n\tcase errorContains(err, \"InvalidAccessKeyId\"):\n\t\treturn fmt.Errorf(\"aws access key id you provided does not exist in our records: %w\", err)\n\tcase errorContains(err, \"AuthenticationFailed\"):\n\t\treturn fmt.Errorf(\"azure storage key you provided is not valid: %w\", err)\n\tcase errorContains(err, \"invalid_grant\"):\n\t\treturn fmt.Errorf(\"google app credentials you provided is not valid: %w\", err)\n\tcase errorContains(err, \"no such host\"):\n\t\treturn fmt.Errorf(\"azure storage account you provided is not valid: %w\", err)\n\tcase errorContains(err, \"ServiceCode=ResourceNotFound\"):\n\t\treturn fmt.Errorf(\"missing azure storage key for provided bucket %s: %w\", url, err)\n\tdefault:\n\t\treturn fmt.Errorf(\"failed to write to bucket: %w\", err)\n\t}\n}\n\nfunc getData(ctx *context.Context, conf config.Blob, path string) ([]byte, error) {\n\tdata, err := os.ReadFile(path)\n\tif err != nil {\n\t\treturn data, fmt.Errorf(\"failed to open file %s: %w\", path, err)\n\t}\n\tif conf.KMSKey == \"\" {\n\t\treturn data, nil\n\t}\n\tkeeper, err := secrets.OpenKeeper(ctx, conf.KMSKey)\n\tif err != nil {\n\t\treturn data, fmt.Errorf(\"failed to open kms %s: %w\", conf.KMSKey, err)\n\t}\n\tdefer keeper.Close()","sourceCodeStart":207,"sourceCodeEnd":243,"githubUrl":"https://github.com/goreleaser/goreleaser/blob/f5edd7395693c0c6b501dc722d445d2e86af854d/internal/pipe/blob/upload.go#L207-L243","documentation":"handleError maps the Azure error ServiceCode=ResourceNotFound to this message: the storage request reached the account but the target container (or resource) was not found — typically because no valid auth key is present the account treats the request as anonymous, or the container itself doesn't exist.","triggerScenarios":"Azure Blob upload where the container name in blob config does not exist, or AZURE_STORAGE_KEY is unset/empty so requests are unauthenticated and Azure returns ResourceNotFound for the container.","commonSituations":"Forgot to set the Azure key secret in CI; container deleted between releases; container name typo; container created with a different name/case.","solutions":["Set AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_KEY in the environment so requests are authenticated","Verify the container exists: az storage container list --account-name <account>","Fix the container name (blob: config) to exactly match the existing container","Create the missing container before the release runs"],"exampleFix":"# before\nblobs:\n  - provider: azure\n    bucket: existing-account\n    # key never provided -> ResourceNotFound\n# after\nblobs:\n  - provider: azure\n    bucket: existing-account\n# and in CI env:\n# AZURE_STORAGE_ACCOUNT / AZURE_STORAGE_KEY set","handlingStrategy":"validation","validationCode":"az storage container exists \\\n  --account-name \"$AZURE_STORAGE_ACCOUNT\" \\\n  --name \"releases\" \\\n  --query exists -o tsv | grep -q true || { echo \"container missing or no key set\"; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always export AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_KEY for azure blob uploads","Ensure the target container exists before releasing","Match container name and case exactly in config","Create containers via IaC so they never go missing"],"tags":["go","goreleaser","azure","storage","credentials"],"backgroundTag":"missing-storage-key","analyzedSha":"f5edd7395693c0c6b501dc722d445d2e86af854d","analyzedAt":"2026-09-05T09:57:18.807Z","contentChangedAt":"2026-09-05T09:57:18.807Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}