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.
WARNING: Could not create cache adapter error=cache factory not found: factory for cache adapter "s3" was not registeredCommon 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
- Set the cache
Typeand fill every required field for that backend. - Provide valid credentials (or instance IAM) for the bucket.
- Restart the runner and confirm the warning is gone.
# 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.