Cache fails for Pull Request re-runs with "No scopes with read permission were found on the request."
See original GitHub issueIn pull requests we often get:
[warning]No scopes with read permission were found on the request.
And the build runs without cache.
Please note that I’m talking about pull request build triggered when pushing a commit (or opening the PR). So this issue is not explained by #129.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:21
- Comments:21 (7 by maintainers)
Top Results From Across the Web
Error: getCacheEntry failed: No scopes with read permission ...
Since the error mentions cache I've attempted: Re-running the workflow; Adding a new commit (assuming it might bust the cache) ...
Read more >Azure DevOps: pipeline caching: pull requests: cache miss at ...
A cache is found at the parent branch scope and the pipeline downloads and uses the archive. After the build, the pipeline cache...
Read more >Enabling Docker Layer Caching - CircleCI
Docker layer caching (DLC) can reduce Docker image build times on CircleCI. DLC is available on the Free and above usage plans (credits...
Read more >Creating a pull request with nested groups enabled takes a ...
It takes a long time for Bitbucket Server to resolve reviewers for a Pull Request when said reviewers are at the bottom of...
Read more >Troubleshooting Geo - GitLab Docs
If the user interface is not working, or you are unable to sign in, ... This machine's Geo node name matches a database...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
👋 Hey all, thank you for your patience. Pull Request re-runs should now have the correct GitHub Ref and work with this action.
👋 Hey all, we’re working on this issue but it will require fixes internally to fix the GitHub ref for pull request re-runs.
For some background, every cache has a “scope” (see Docs: Matching a Cache Key which is determined by the GitHub ref of the current event that triggered the workflow run (as well as the event type itself).
The scope is encoded in the JWT token used by the action to authenticate to the internal cache service. The scope is used to determine which caches we can read and write to and is intended to prevent any potential security issues. For example, you wouldn’t want a pull request from a fork to be able to write to the cache on the default branch.
The logic that determines what scopes to give the token also validates that the ref of the pull request is valid (
refs/pulls/*
). When a pull request ref does not match that format, we don’t give any scopes to the token. This is why you see the error “No scopes with read permission were found on the request”.