Gradle "Could not store entry ... in remote build cache" in CI
Gradle finished a task and tried to push its output to the remote build cache, but the write was rejected. A 403 means no push permission; a full or read-only node also refuses stores. The build still succeeds.
What this error means
The log shows "Could not store entry '...' in remote build cache" with a 403 or a server error, so later jobs cannot reuse that output.
Could not store entry 'a1b2...' in remote build cache:
Storing entry at 'https://develocity.example.com/cache/a1b2...' response status 403: ForbiddenCommon causes
The access key cannot write to the cache
The Develocity key can read but not push, or isPush is false, so stores are rejected while reads still work.
The cache node is read-only or full
A cache node configured read-only, or one that has hit its capacity, refuses new stores.
How to fix it
Enable push and grant write permission
- Set
isPush = trueon the remote cache for CI runs. - Confirm the access key principal has cache write permission.
- Re-run so successful task outputs are stored.
buildCache {
remote(develocity.buildCache) {
server = "https://develocity.example.com"
isPush = true
}
}Scope push to trusted branches
Restrict cache writes to trusted CI branches so untrusted PRs cannot poison the cache while still reading from it.
isPush = System.getenv("GITHUB_REF") == "refs/heads/main"How to prevent it
- Grant the access key push permission for the CI cache.
- Set
isPush = trueonly on trusted branches. - Monitor cache node capacity so stores are not refused.