From 1c6aece08e17058f763caf5b061632193b484fc8 Mon Sep 17 00:00:00 2001 From: Angel Misevski Date: Wed, 2 Aug 2023 19:15:05 -0400 Subject: [PATCH] Use custom http.Client for go-git https client Signed-off-by: Angel Misevski --- project-clone/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/project-clone/main.go b/project-clone/main.go index 3ad7c6a01..4b1c10851 100644 --- a/project-clone/main.go +++ b/project-clone/main.go @@ -29,6 +29,8 @@ import ( "github.com/devfile/devworkspace-operator/project-clone/internal" "github.com/devfile/devworkspace-operator/project-clone/internal/git" "github.com/devfile/devworkspace-operator/project-clone/internal/zip" + gitclient "github.com/go-git/go-git/v5/plumbing/transport/client" + githttp "github.com/go-git/go-git/v5/plumbing/transport/http" ) const ( @@ -89,6 +91,7 @@ func main() { }, }, } + gitclient.InstallProtocol("https", githttp.NewClient(httpClient)) } encounteredError := false