{"record":{"id":"3893772dfc0d4418","repo":"coollabsio/coolify","slug":"repository-does-not-exist-please-check-your-repos","errorCode":null,"errorMessage":"Repository does not exist. Please check your repository URL and try again.","messagePattern":"Repository does not exist\\. Please check your repository URL and try again\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"app/Models/Application.php","lineNumber":2172,"sourceCode":"                \"cat .$workdir$composeFile\",\n            ]);\n        }\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 [","sourceCodeStart":2154,"sourceCodeEnd":2190,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Models/Application.php#L2154-L2190","documentation":"Same 'fatal: repository ... does not exist' Git error, but raised through a non-deploy-key auth type (token, GitHub App, public HTTPS). Git could not resolve/read the repository at the given URL with the available credential, so Coolify surfaces it as 'Repository does not exist' — the URL/credential pairing is wrong, independent of deploy keys.","triggerScenarios":"Typo'd repository URL (wrong owner, missing .git where required, stale org name after rename); private repo accessed with a token lacking scope or an expired token; GitHub App not installed on the target account/org; HTTP URL for an SSH-only internal Git.","commonSituations":"Organization or repository renamed and the stored URL now 404s; personal access token expired or revoked; GitHub App installation removed by an org admin; migrating from github.com to Enterprise with stale URLs.","solutions":["Correct the repository URL in the application's source settings (owner/name exact, correct host).","If the repo is private, refresh the credential: new PAT with repo scope, or reinstall the GitHub App for that org/user.","Run git ls-remote on the URL from the destination server to reproduce the exact failure.","After an org/repo rename, update the URL on every application that referenced the old path."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate URL shape and access before queueing a deployment\nif (! ValidGitRepositoryUrl::validate($application->git_repository)) { /* reject bad URL */ }\n$status = $application->getGitRemoteStatus(deployment_uuid: $uuid);\nif (! $status['is_accessible']) { /* verify owner/name and token/App installation */ }","typeGuard":null,"tryCatchPattern":"catch (RuntimeException $e) { if (str_contains($e->getMessage(), 'Repository does not exist')) { halt; ask user to fix URL or credential scope; do not retry unchanged. } else { throw $e; } }","preventionTips":["After org/repo renames, update application URLs immediately (set up a rename checklist).","Use the connection test in app settings whenever credentials change.","Scope tokens to the orgs you deploy from and monitor their expiry."],"tags":["git","repository","authentication","coolify"],"backgroundTag":"git-repository-not-found","analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}