{"record":{"id":"453aa778736aac0b","repo":"testcontainers/testcontainers-java","slug":"no-config-supplied-checked-in-order-configfile-file-not","errorCode":null,"errorMessage":"No config supplied. Checked in order: configFile (file not found), DOCKER_AUTH_ENV_VAR (not set)","messagePattern":"No config supplied\\. Checked in order: configFile \\(file not found\\), DOCKER_AUTH_ENV_VAR \\(not set\\)","errorType":"exception","errorClass":"NotFoundException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/testcontainers/utility/RegistryAuthLocator.java","lineNumber":196,"sourceCode":"    private JsonNode getDockerAuthConfig() throws Exception {\n        log.debug(\n            \"RegistryAuthLocator has configFile: {} ({}) configEnv: {} ({}) and commandPathPrefix: {}\",\n            configFile,\n            configFile.exists() ? \"exists\" : \"does not exist\",\n            DOCKER_AUTH_ENV_VAR,\n            configEnv != null ? \"exists\" : \"does not exist\",\n            commandPathPrefix\n        );\n\n        if (configEnv != null) {\n            log.debug(\"RegistryAuthLocator reading from environment variable: {}\", DOCKER_AUTH_ENV_VAR);\n            return OBJECT_MAPPER.readTree(configEnv);\n        } else if (configFile.exists()) {\n            log.debug(\"RegistryAuthLocator reading from configFile: {}\", configFile);\n            return OBJECT_MAPPER.readTree(configFile);\n        }\n\n        throw new NotFoundException(\n            \"No config supplied. Checked in order: \" +\n            configFile +\n            \" (file not found), \" +\n            DOCKER_AUTH_ENV_VAR +\n            \" (not set)\"\n        );\n    }\n\n    private AuthConfig findExistingAuthConfig(final JsonNode config, final String reposName) throws Exception {\n        final Map.Entry<String, JsonNode> entry = findAuthNode(config, reposName);\n\n        if (entry != null && entry.getValue() != null && entry.getValue().size() > 0) {\n            final AuthConfig deserializedAuth = OBJECT_MAPPER\n                .treeToValue(entry.getValue(), AuthConfig.class)\n                .withRegistryAddress(entry.getKey());\n\n            if (\n                StringUtils.isBlank(deserializedAuth.getUsername()) &&","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/testcontainers/testcontainers-java/blob/8e549514e3f01c57d70546fbb8599d138f3903e5/core/src/main/java/org/testcontainers/utility/RegistryAuthLocator.java#L178-L214","documentation":"RegistryAuthLocator resolves Docker registry credentials for private image pulls. It looks first at the DOCKER_AUTH_CONFIG environment variable (JSON config) and then at the Docker config file (default ~/.docker/config.json, or the file set via withConfigFile). If neither exists it throws NotFoundException, meaning Testcontainers has no credentials to authenticate the pull.","triggerScenarios":"TestcontainersConfiguration.getInstance().getRegistryAuthLocator().getAuthConfig(...) during container start when: DOCKER_AUTH_CONFIG env var is unset AND the resolved docker config file does not exist (no ~/.docker/config.json, or a custom DOCKER_CONFIG path points nowhere).","commonSituations":"CI machines that never ran `docker login`; users on imageless/kaniko setups expecting env-based auth; DOCKER_CONFIG env var pointing to a directory without config.json; pulling a private image (e.g. from a corporate registry) whose credentials were only configured in a different user's home directory.","solutions":["Run `docker login <registry>` on the machine/user running tests to create ~/.docker/config.json","Set the DOCKER_AUTH_CONFIG environment variable to a JSON docker config (e.g. {\"auths\":{\"registry\":{\"auth\":\"base64(user:pass)\"}}})","If using a custom DOCKER_CONFIG, verify it points to the directory containing config.json","Check that the test process actually runs as the user who holds the Docker credentials (CI often switches users)"],"exampleFix":"// CI script before\nexport DOCKER_AUTH_CONFIG='{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"dXNlcjpwYXNz\"}}}'","handlingStrategy":"validation","validationCode":"boolean hasAuth() {\n    if (System.getenv(\"DOCKER_AUTH_CONFIG\") != null) return true;\n    String dockerConfig = System.getenv().getOrDefault(\"DOCKER_CONFIG\",\n        System.getProperty(\"user.home\") + \"/.docker\");\n    return new File(dockerConfig, \"config.json\").exists();\n}","typeGuard":null,"tryCatchPattern":"try {\n    startContainer();\n} catch (NotFoundException e) {\n    if (e.getMessage().contains(\"No config supplied\")) {\n        throw new IllegalStateException(\"Run 'docker login' or set DOCKER_AUTH_CONFIG before tests\", e);\n    }\n    throw e;\n}","preventionTips":["Add `docker login` (with a CI-scoped token) to pipeline setup","Set DOCKER_AUTH_CONFIG as a secret-injected env var in CI","Verify the test process user's home actually contains ~/.docker/config.json"],"tags":["docker","registry-auth","credentials","config"],"backgroundTag":"missing-credentials","analyzedSha":"8e549514e3f01c57d70546fbb8599d138f3903e5","analyzedAt":"2026-09-12T14:56:41.227Z","contentChangedAt":"2026-09-12T14:56:41.227Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}