coollabsio/coolify · error · RuntimeException

Invalid branch:

Error message

Invalid branch: 

What it means

Error "Invalid branch: " thrown in coollabsio/coolify.

Source

Thrown at app/Livewire/Project/New/PublicGitRepository.php:286

            // Additional validation for git repository and branch
            if ($this->git_source === 'other') {
                // For 'other' sources, git_repository contains the full URL
                $validator = validator(['git_repository' => $this->git_repository], [
                    'git_repository' => ['required', 'string', new ValidGitRepositoryUrl],
                ]);

                if ($validator->fails()) {
                    throw new \RuntimeException('Invalid repository URL: '.$validator->errors()->first('git_repository'));
                }
            }

            $branchValidator = validator(['git_branch' => $this->git_branch], [
                'git_branch' => ['required', 'string', new ValidGitBranch],
            ]);

            if ($branchValidator->fails()) {
                throw new \RuntimeException('Invalid branch: '.$branchValidator->errors()->first('git_branch'));
            }

            $destination_uuid = $this->query['destination'] ?? null;
            $project_uuid = $this->parameters['project_uuid'];
            $environment_uuid = $this->parameters['environment_uuid'];

            $destination = find_resource_destination_for_current_team($destination_uuid);
            if (! $destination) {
                throw new \Exception('Destination not found.');
            }
            $destination_class = $destination->getMorphClass();

            $project = Project::ownedByCurrentTeam()->where('uuid', $project_uuid)->firstOrFail();
            $environment = $project->environments()->where('uuid', $environment_uuid)->firstOrFail();

            if ($this->git_source === 'other') {
                $application_init = [
                    'name' => generate_random_name(),

View on GitHub (pinned to 70b9acc424)

When it happens

Trigger: Thrown at app/Livewire/Project/New/PublicGitRepository.php:286 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of coollabsio/coolify@70b9acc424 (2026-08-17). Data as JSON: /api/errors/9e293e476aa2bc2b. Report an issue: GitHub.