From 9e04ff5f108d4d6955e3e13762ae0a3635441bfb Mon Sep 17 00:00:00 2001 From: gamerslouis Date: Tue, 25 Jul 2023 23:50:25 +0800 Subject: [PATCH] Fix gitea repo bootstrap failure --- pkg/git/provider_gitea.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/git/provider_gitea.go b/pkg/git/provider_gitea.go index fcd7f426..4e704e50 100644 --- a/pkg/git/provider_gitea.go +++ b/pkg/git/provider_gitea.go @@ -5,6 +5,8 @@ import ( "fmt" "net/http" + "github.com/argoproj-labs/argocd-autopilot/pkg/util" + gt "code.gitea.io/sdk/gitea" ) @@ -24,7 +26,8 @@ type ( ) func newGitea(opts *ProviderOptions) (Provider, error) { - c, err := gt.NewClient(opts.RepoURL, gt.SetToken(opts.Auth.Password)) + host, _, _, _, _, _, _ := util.ParseGitUrl(opts.RepoURL) + c, err := gt.NewClient(host, gt.SetToken(opts.Auth.Password)) if err != nil { return nil, err }