{"record":{"id":"eee71941a43d95e5","repo":"coollabsio/coolify","slug":"invalid-repository-url-validator-errors-fir","errorCode":null,"errorMessage":"Invalid repository URL: {$validator->errors()->first('repository_url')}","messagePattern":"Invalid repository URL: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php","lineNumber":216,"sourceCode":"            return redirect()->route('project.application.configuration', [\n                'application_uuid' => $application->uuid,\n                'environment_uuid' => $environment->uuid,\n                'project_uuid' => $project->uuid,\n            ]);\n        } catch (\\Throwable $e) {\n            return handleError($e, $this);\n        }\n    }\n\n    private function get_git_source()\n    {\n        // Validate repository URL before parsing\n        $validator = validator(['repository_url' => $this->repository_url], [\n            'repository_url' => ['required', 'string', new ValidGitRepositoryUrl],\n        ]);\n\n        if ($validator->fails()) {\n            throw new \\RuntimeException('Invalid repository URL: '.$validator->errors()->first('repository_url'));\n        }\n\n        $this->repository_url_parsed = Url::fromString($this->repository_url);\n        $this->git_host = $this->repository_url_parsed->getHost();\n        $this->git_repository = $this->repository_url_parsed->getSegment(1).'/'.$this->repository_url_parsed->getSegment(2);\n\n        if ($this->git_host === 'github.com') {\n            $this->git_source = GithubApp::where('name', 'Public GitHub')->first();\n\n            return;\n        }\n        if (str($this->repository_url)->startsWith('http')) {\n            $this->git_host = $this->repository_url_parsed->getHost();\n            $this->git_repository = $this->repository_url_parsed->getSegment(1).'/'.$this->repository_url_parsed->getSegment(2);\n            // Convert to SSH format for deploy key usage\n            $this->git_repository = Str::finish(\"git@$this->git_host:$this->git_repository\", '.git');\n        } else {\n            // If it's already in SSH format, just use it as-is","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php#L198-L234","documentation":"Error \"Invalid repository URL: {$validator->errors()->first('repository_url')}\" thrown in coollabsio/coolify.","triggerScenarios":"Thrown at app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php:216 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}