diff --git a/app/Http/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php b/app/Http/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php
index 0397b822f..522eb8845 100644
--- a/app/Http/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php
+++ b/app/Http/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php
@@ -146,18 +146,19 @@ public function submit()
private function get_git_source()
{
- if (Str::of($this->repository_url)->startsWith('http')) {
- $this->repository_url_parsed = Url::fromString($this->repository_url);
- $this->git_host = $this->repository_url_parsed->getHost();
- $this->git_repository = $this->repository_url_parsed->getSegment(1) . '/' . $this->repository_url_parsed->getSegment(2);
- } else {
- $this->git_repository = $this->repository_url;
- }
+ $this->repository_url_parsed = Url::fromString($this->repository_url);
+ $this->git_host = $this->repository_url_parsed->getHost();
+ $this->git_repository = $this->repository_url_parsed->getSegment(1) . '/' . $this->repository_url_parsed->getSegment(2);
if ($this->git_host == 'github.com') {
$this->git_source = GithubApp::where('name', 'Public GitHub')->first();
return;
}
+ if (Str::of($this->repository_url)->startsWith('http')) {
+ $this->git_host = $this->repository_url_parsed->getHost();
+ $this->git_repository = $this->repository_url_parsed->getSegment(1) . '/' . $this->repository_url_parsed->getSegment(2);
+ $this->git_repository = Str::finish("git@$this->git_host:$this->git_repository", '.git');
+ }
$this->git_source = 'other';
}
}
diff --git a/lang/en.json b/lang/en.json
index a0a62155f..1f4fbdb74 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -20,5 +20,5 @@
"input.code": "One-time code",
"input.recovery_code": "Recovery code",
"button.save": "Save",
- "repository.url": "Examples
https://github.com/coollabsio/coolify-examples main branch will be selected
https://github.com/coollabsio/coolify-examples/tree/nodejs-fastify nodejs-fastify branch will be selected.
https://gitea.com/sedlav/expressjs.git main branch will be selected.
https://gitlab.com/andrasbacsai/nodejs-example.git main branch will be selected."
+ "repository.url": "Examples
For Public repositories, use https://....
For Private repositories, use git@....
https://github.com/coollabsio/coolify-examples main branch will be selected
https://github.com/coollabsio/coolify-examples/tree/nodejs-fastify nodejs-fastify branch will be selected.
https://gitea.com/sedlav/expressjs.git main branch will be selected.
https://gitlab.com/andrasbacsai/nodejs-example.git main branch will be selected."
}