From 21fc02d5dbcfeca424272ccaa6fa73b281cda2f9 Mon Sep 17 00:00:00 2001 From: alexcc Date: Mon, 14 Aug 2023 10:26:00 +0800 Subject: [PATCH] fix: clone self-host repository failed --- pkg/vcs/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/vcs/repo.go b/pkg/vcs/repo.go index 2bad77efb1..28d68ce820 100644 --- a/pkg/vcs/repo.go +++ b/pkg/vcs/repo.go @@ -145,7 +145,7 @@ func CloneGitRepo(link, dir string) (*git.Repository, error) { switch endpoint.Protocol { case "http", "https": - src = endpoint.Host + endpoint.Path + src = strings.TrimLeft(endpoint.String(), endpoint.Protocol+"://") default: src = link }