question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cache Task giving permissions error

See original GitHub issue

Question
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:closed
  • Created 3 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
sdipeshcommented, Dec 7, 2020

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.

1reaction
ngarg-panwcommented, Dec 7, 2020

@sdipesh Can you pls elaborate more. What other type of release pipeline do I need to create to take advantage of cache task?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found