{"record":{"id":"56b4bc7617c77ccc","repo":"coollabsio/coolify","slug":"failed-to-read-the-docker-compose-file-from-the-re","errorCode":null,"errorMessage":"Failed to read the Docker Compose file from the repository.","messagePattern":"Failed to read the Docker Compose file from the repository\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"app/Models/Application.php","lineNumber":2174,"sourceCode":"        }\n        try {\n            $composeFileContent = instant_remote_process($commands, $this->destination->server);\n        } catch (\\Exception $e) {\n            // Restore original values on failure only\n            $this->docker_compose_location = $initialDockerComposeLocation;\n            $this->base_directory = $initialBaseDirectory;\n            $this->save();\n\n            if (str($e->getMessage())->contains('No such file')) {\n                throw new RuntimeException(\"Docker Compose file not found at: $workdir$composeFile (branch: {$this->git_branch})<br><br>Check if you used the right extension (.yaml or .yml) in the compose file name.\");\n            }\n            if (str($e->getMessage())->contains('fatal: repository') && str($e->getMessage())->contains('does not exist')) {\n                if ($this->deploymentType() === 'deploy_key') {\n                    throw new RuntimeException('Your deploy key does not have access to the repository. Please check your deploy key and try again.');\n                }\n                throw new RuntimeException('Repository does not exist. Please check your repository URL and try again.');\n            }\n            throw new RuntimeException('Failed to read the Docker Compose file from the repository.');\n        } finally {\n            // Cleanup only - restoration happens in catch block\n            $commands = collect([\n                \"rm -rf /tmp/{$uuid}\",\n            ]);\n            instant_remote_process($commands, $this->destination->server, false);\n        }\n        if ($composeFileContent) {\n            $this->docker_compose_raw = $composeFileContent;\n            $this->save();\n            $parsedServices = $this->parse();\n            if ($this->docker_compose_domains) {\n                $this->reconcileDockerComposeDomains($parsedServices);\n            }\n\n            return [\n                'parsedServices' => $parsedServices,\n                'initialDockerComposeLocation' => $this->docker_compose_location,","sourceCodeStart":2156,"sourceCodeEnd":2192,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Models/Application.php#L2156-L2192","documentation":"Catch-all for the Git compose-file read: the remote clone/cat failed with an error matching neither 'No such file' nor 'fatal: repository ... does not exist'. The original exception text was swallowed, so anything transient (SSH timeouts, DNS failures, disk full on the server, permission errors, unusual Git versions) lands here.","triggerScenarios":"Destination server temporarily unable to reach the git host (network blip, DNS failure); SSH to the server itself flaky; disk exhaustion breaking the clone; git not installed or too old on the destination server; credential prompts hanging until timeout.","commonSituations":"Self-hosted Git with intermittent uptime; server disk full from image/layer buildup; saturated SSH multiplexing during parallel deploys; custom git host requiring newer client features.","solutions":["Re-run the operation once — transient network/SSH failures are the most common cause.","Check disk space and SSH connectivity to the destination server (df -h, ssh root@server).","Manually execute the underlying clone+cat on the server to see the raw error Coolify hid.","If it persists, inspect Coolify logs for the original exception message just before this RuntimeException."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Cheap pre-flight: server reachable and disk available before clone\nif (! $server->isReachable()) { /* defer deployment */ }\nif (instant_remote_process(['df -h / | awk NR==2'], $server) reports < 1GB free) { /* alert before attempting git operations */ }","typeGuard":null,"tryCatchPattern":"catch (RuntimeException $e) { if (str_contains($e->getMessage(), 'Failed to read the Docker Compose file')) { retry once after a short delay (transient SSH/network); on second failure capture the raw remote error by running the clone manually and surface it; } else { throw $e; } }","preventionTips":["Keep destination servers monitored for disk space and SSH reachability.","Log the underlying exception message before it is wrapped, so this catch-all is diagnosable.","Schedule retries with jitter for compose-from-git reads during git-host incidents."],"tags":["git","network","docker-compose","coolify"],"backgroundTag":"git-clone-failed","analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}