Cache Task giving permissions error
See original GitHub issueQuestion
Type: Release Pipeline
Enter Task Name: Cache Task
Environment
- Server - Azure Pipelines ?
Issue Description
In my extension, I am downloading an executable everytime a pipeline runs. So, to avoid that I thought of using the Cache task. I defined my task as follows:
`steps:
- task: Cache@2 displayName: Cache inputs: key: 'twsictli | $(Agent.OS) ’ path: ‘twistcli-scan’ cacheHitVar: ‘TWISTCLI_RETRIEVED’ continueOnError: true`
And in my extension code I plan to check the value of ‘TWISTCLI_RETRIEVED’ to decide whether or not to download the executable. If its true, then no need to download.
But when the cache task executes, I am getting the following exception:
2020-12-02T01:21:47.4794368Z ##[error]Access Denied: Microsoft.TeamFoundation.ServiceIdentity;52867c9c-da85-4427-87e5-f4ea13da51a4:Build:ac4ff7ab-7c76-49ef-b741-04be121ffb0b needs the following permission(s) on the resource $ to perform this action: Read pipeline cache entries
I couldn’t find any related permissions. Pls suggest.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (1 by maintainers)
In Azure DevOps, you have to create a yml pipeline and use the cache task within the pipeline. It works in yml pipelines but not classic pipelines.
@sdipesh Can you pls elaborate more. What other type of release pipeline do I need to create to take advantage of cache task?