{"record":{"id":"ebb9b1f49a74cfaa","repo":"testcontainers/testcontainers-java","slug":"docker-auth-config-credsstore-field-will-be-ignored-because","errorCode":null,"errorMessage":"Docker auth config credsStore field will be ignored, because value is blank","messagePattern":"Docker auth config credsStore field will be ignored, because value is blank","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"core/src/main/java/org/testcontainers/utility/RegistryAuthLocator.java","lineNumber":249,"sourceCode":"\n    private AuthConfig authConfigUsingHelper(final JsonNode config, final String reposName) throws Exception {\n        final JsonNode credHelpers = config.get(\"credHelpers\");\n        if (credHelpers != null && credHelpers.size() > 0) {\n            final JsonNode helperNode = credHelpers.get(reposName);\n            if (helperNode != null && helperNode.isTextual()) {\n                final String helper = helperNode.asText();\n                return runCredentialProvider(reposName, helper);\n            }\n        }\n        return null;\n    }\n\n    private AuthConfig authConfigUsingStore(final JsonNode config, final String reposName) throws Exception {\n        final JsonNode credsStoreNode = config.get(\"credsStore\");\n        if (credsStoreNode != null && !credsStoreNode.isMissingNode() && credsStoreNode.isTextual()) {\n            final String credsStore = credsStoreNode.asText();\n            if (StringUtils.isBlank(credsStore)) {\n                log.warn(\"Docker auth config credsStore field will be ignored, because value is blank\");\n                return null;\n            }\n            return runCredentialProvider(reposName, credsStore);\n        }\n        return null;\n    }\n\n    private Map.Entry<String, JsonNode> findAuthNode(final JsonNode config, final String reposName) {\n        final JsonNode auths = config.get(\"auths\");\n        if (auths != null && auths.size() > 0) {\n            final Iterator<Map.Entry<String, JsonNode>> fields = auths.fields();\n            while (fields.hasNext()) {\n                final Map.Entry<String, JsonNode> entry = fields.next();\n                if (entry.getKey().endsWith(\"://\" + reposName) || entry.getKey().equals(reposName)) {\n                    return entry;\n                }\n            }\n        }","sourceCodeStart":231,"sourceCodeEnd":267,"githubUrl":"https://github.com/testcontainers/testcontainers-java/blob/8e549514e3f01c57d70546fbb8599d138f3903e5/core/src/main/java/org/testcontainers/utility/RegistryAuthLocator.java#L231-L267","documentation":"RegistryAuthLocator reads the Docker config.json to resolve credentials. If the credsStore field exists but is an empty/blank string, it cannot invoke a credential helper, so it warns that the field is ignored and returns null (falling back to other auth resolution).","triggerScenarios":"authConfigUsingStore() finds config.get(\"credsStore\") is textual but StringUtils.isBlank when resolving auth for a repository during image pull/push.","commonSituations":"Corrupted or hand-edited ~/.docker/config.json where credsStore was cleared but left as \"\"; some tooling writes an empty credsStore key; Docker Desktop upgrades leaving stale fields.","solutions":["Fix ~/.docker/config.json: remove the empty credsStore key or set it to a real helper (e.g. \"desktop\")","Re-run `docker login` so Docker rewrites a valid config.json","Provide credentials another way (explicit AuthConfig, registry mirror without auth)"],"exampleFix":"// before (~/.docker/config.json)\n{ \"auths\": {}, \"credsStore\": \"\" }\n// after\n{ \"auths\": {}, \"credsStore\": \"desktop\" }","handlingStrategy":"validation","validationCode":"var cfg = new com.fasterxml.jackson.databind.ObjectMapper()\n    .readTree(Paths.get(System.getProperty(\"user.home\"), \".docker\", \"config.json\").toFile());\nvar cs = cfg.path(\"credsStore\");\nif (cs.isTextual() && cs.asText().isBlank()) {\n    throw new IllegalStateException(\"config.json has blank credsStore — run docker login\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never hand-edit ~/.docker/config.json credsStore","Re-run docker login after Docker Desktop upgrades","Validate config.json in CI setup before pulling private images"],"tags":["testcontainers","docker-auth","credential-helper","config"],"backgroundTag":"empty-required-field","analyzedSha":"8e549514e3f01c57d70546fbb8599d138f3903e5","analyzedAt":"2026-09-12T14:56:41.227Z","contentChangedAt":"2026-09-12T14:56:41.227Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}