Skip to content

Commit

Permalink
Use custom http.Client for go-git https client
Browse files Browse the repository at this point in the history
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
  • Loading branch information
amisevsk committed Aug 28, 2023
1 parent c171096 commit f26d90e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions project-clone/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -89,6 +91,7 @@ func main() {
},
},
}
gitclient.InstallProtocol("https", githttp.NewClient(httpClient))
}

encounteredError := false
Expand Down

0 comments on commit f26d90e

Please sign in to comment.