Skip to content
Latchkey

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.

Gradle
Could not store entry 'a1b2...' in remote build cache:
Storing entry at 'https://develocity.example.com/cache/a1b2...' response status 403: Forbidden

Common 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

  1. Set isPush = true on the remote cache for CI runs.
  2. Confirm the access key principal has cache write permission.
  3. Re-run so successful task outputs are stored.
settings.gradle.kts
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.

settings.gradle.kts
isPush = System.getenv("GITHUB_REF") == "refs/heads/main"

How to prevent it

  • Grant the access key push permission for the CI cache.
  • Set isPush = true only on trusted branches.
  • Monitor cache node capacity so stores are not refused.

Frequently asked questions

What causes ""Could not store entry ... in remote build cache""?
The Develocity key can read but not push, or isPush is false, so stores are rejected while reads still work.
How do I fix "Could not store entry ... in remote build cache"?
Enable push and grant write permission

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card