{"record":{"id":"36124767ba99edcb","repo":"docker/compose","slug":"git-remote-resource-is-disabled-by-q","errorCode":null,"errorMessage":"git remote resource is disabled by %q","messagePattern":"git remote resource is disabled by %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/remote/git.go","lineNumber":81,"sourceCode":"\tdockerCli command.Cli\n\toffline   bool\n\tknown     map[string]string\n}\n\nfunc (g gitRemoteLoader) Accept(path string) bool {\n\t_, _, err := gitutil.ParseGitRef(path)\n\treturn err == nil\n}\n\nvar commitSHA = regexp.MustCompile(`^[a-f0-9]{40}$`)\n\nfunc (g gitRemoteLoader) Load(ctx context.Context, path string) (string, error) {\n\tenabled, err := gitRemoteLoaderEnabled()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif !enabled {\n\t\treturn \"\", fmt.Errorf(\"git remote resource is disabled by %q\", GIT_REMOTE_ENABLED)\n\t}\n\n\tref, _, err := gitutil.ParseGitRef(path)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tlocal, ok := g.known[path]\n\tif !ok {\n\t\tif ref.Ref == \"\" {\n\t\t\tref.Ref = \"HEAD\" // default branch\n\t\t}\n\n\t\terr = g.resolveGitRef(ctx, path, ref)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/docker/compose/blob/ddc4b044b62e9f715212ea4143fa830fac76382f/pkg/remote/git.go#L63-L99","documentation":"The git remote loader refuses to resolve an include whose path parses as a git ref when `COMPOSE_EXPERIMENTAL_GIT_REMOTE` is explicitly set to a falsy boolean. It is the intentional 'feature off' error, returned from `gitRemoteLoader.Load`.","triggerScenarios":"A compose file uses an include like `include: [{path: git://...}]` (or another ParseGitRef-recognized form) while `COMPOSE_EXPERIMENTAL_GIT_REMOTE=false` is exported in the environment.","commonSituations":"Teams disabling experimental features in CI or hardened environments; stale env settings from older Compose versions where the feature was opt-in and a project still uses git includes.","solutions":["Enable the feature: `export COMPOSE_EXPERIMENTAL_GIT_REMOTE=true`","Remove the git remote include and vendor the file locally if the feature must stay off"],"exampleFix":"# before\nexport COMPOSE_EXPERIMENTAL_GIT_REMOTE=false\n# compose.yaml has: include: [{path: git://github.com/org/repo.git#main}] \n\n# after\nexport COMPOSE_EXPERIMENTAL_GIT_REMOTE=true","handlingStrategy":"validation","validationCode":"# refuse to run when git includes are needed but the feature is off\nif grep -q 'git://' compose*.yaml 2>/dev/null && [ \"${COMPOSE_EXPERIMENTAL_GIT_REMOTE:-}\" = \"false\" ]; then\n  echo \"project needs git remote includes; unset or set true\" >&2; exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Document required env flags next to git:// includes in the project README","Prefer local includes when running in environments that disable experimental features"],"tags":["compose","git-remote","include","feature-flag"],"backgroundTag":null,"analyzedSha":"ddc4b044b62e9f715212ea4143fa830fac76382f","analyzedAt":"2026-08-15T13:31:42.319Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}