{"record":{"id":"8c84392541b3326c","repo":"docker/compose","slug":"compose-experimental-git-remote-environment-variab","errorCode":null,"errorMessage":"COMPOSE_EXPERIMENTAL_GIT_REMOTE environment variable expects boolean value: %w","messagePattern":"COMPOSE_EXPERIMENTAL_GIT_REMOTE environment variable expects boolean value: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/remote/git.go","lineNumber":47,"sourceCode":"\t\"strings\"\n\n\t\"github.com/compose-spec/compose-go/v2/cli\"\n\t\"github.com/compose-spec/compose-go/v2/loader\"\n\t\"github.com/compose-spec/compose-go/v2/types\"\n\t\"github.com/docker/cli/cli/command\"\n\tgitutil \"github.com/moby/buildkit/frontend/dockerfile/dfgitutil\"\n\t\"github.com/sirupsen/logrus\"\n\n\t\"github.com/docker/compose/v5/pkg/api\"\n)\n\nconst GIT_REMOTE_ENABLED = \"COMPOSE_EXPERIMENTAL_GIT_REMOTE\"\n\nfunc gitRemoteLoaderEnabled() (bool, error) {\n\tif v := os.Getenv(GIT_REMOTE_ENABLED); v != \"\" {\n\t\tenabled, err := strconv.ParseBool(v)\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"COMPOSE_EXPERIMENTAL_GIT_REMOTE environment variable expects boolean value: %w\", err)\n\t\t}\n\t\treturn enabled, err\n\t}\n\treturn true, nil\n}\n\nfunc NewGitRemoteLoader(dockerCli command.Cli, offline bool) loader.ResourceLoader {\n\treturn gitRemoteLoader{\n\t\tdockerCli: dockerCli,\n\t\toffline:   offline,\n\t\tknown:     map[string]string{},\n\t}\n}\n\ntype gitRemoteLoader struct {\n\tdockerCli command.Cli\n\toffline   bool\n\tknown     map[string]string","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/docker/compose/blob/ddc4b044b62e9f715212ea4143fa830fac76382f/pkg/remote/git.go#L29-L65","documentation":"`COMPOSE_EXPERIMENTAL_GIT_REMOTE` gates the `oci://`-style git remote include loader. Its value is parsed with `strconv.ParseBool`; anything not in {1,t,T,TRUE,true,True,0,f,F,FALSE,false,False} fails and this error wraps the parse failure.","triggerScenarios":"Setting the env var to values like `yes`, `on`, `enable`, or `True ` (with whitespace) and running any compose command that initializes the remote resource loader.","commonSituations":"Scripts using `export COMPOSE_EXPERIMENTAL_GIT_REMOTE=yes`; CI env matrices quoting values oddly; users assuming on/off semantics instead of Go booleans.","solutions":["Set the variable to a valid Go boolean, e.g. `COMPOSE_EXPERIMENTAL_GIT_REMOTE=true`","Unset the variable entirely — an empty value defaults the feature to enabled","Audit shell scripts and CI secrets for values like yes/no/on/off"],"exampleFix":"# before\nexport COMPOSE_EXPERIMENTAL_GIT_REMOTE=yes\n\n# after\nexport COMPOSE_EXPERIMENTAL_GIT_REMOTE=true","handlingStrategy":"validation","validationCode":"# bash: fail fast on non-boolean experimental flags\nv=\"${COMPOSE_EXPERIMENTAL_GIT_REMOTE:-}\"\n[ -z \"$v\" ] || [ \"$v\" = \"0\" ] || [ \"$v\" = \"1\" ] || { case \"${v,,}\" in true|false) ;; *) echo \"bad bool: $v\" >&2; exit 1;; esac; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only true/false (or 1/0) for COMPOSE_* boolean flags","Centralize experimental flag settings in one script/env-file to avoid informal spellings"],"tags":["compose","environment","git-remote","config"],"backgroundTag":null,"analyzedSha":"ddc4b044b62e9f715212ea4143fa830fac76382f","analyzedAt":"2026-08-15T13:31:42.319Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}