Skip to content
Latchkey

GitLab CI "Could not create cache adapter" in CI

The runner could not initialize its distributed cache backend (S3, GCS, or Azure). The [runners.cache] section is incomplete or the credentials are wrong, so caching is skipped and the warning is logged.

What this error means

Jobs log "WARNING: Could not create cache adapter" and caching silently does nothing. Subsequent jobs cannot restore the cache.

GitLab Runner
WARNING: Could not create cache adapter           error=cache factory not found: factory for cache adapter "s3" was not registered

Common causes

Incomplete distributed cache configuration

A missing bucket, region, or endpoint in [runners.cache] prevents the runner from constructing the adapter.

Bad or unset cache credentials

Invalid access keys, or a cache type the runner build does not support, makes adapter creation fail.

How to fix it

Complete the cache configuration

  1. Set the cache Type and fill every required field for that backend.
  2. Provide valid credentials (or instance IAM) for the bucket.
  3. Restart the runner and confirm the warning is gone.
config.toml
# config.toml
[runners.cache]
  Type = "s3"
  Shared = true
  [runners.cache.s3]
    ServerAddress = "s3.amazonaws.com"
    BucketName = "gitlab-runner-cache"
    BucketLocation = "us-east-1"

Verify credentials and connectivity

Confirm the runner host can reach the bucket and that the keys have read/write on it.

How to prevent it

  • Fill all required [runners.cache] fields for the chosen backend.
  • Validate cache credentials when provisioning the runner.
  • Monitor for the cache-adapter warning so caching does not silently break.

Frequently asked questions

What causes ""Could not create cache adapter""?
A missing bucket, region, or endpoint in [runners.cache] prevents the runner from constructing the adapter.
How do I fix "Could not create cache adapter"?
Complete the cache configuration

Related guides

References

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