Skip to content

Commit

Permalink
use DefaultTransportWithInsecure from autopilot
Browse files Browse the repository at this point in the history
  • Loading branch information
ATGardner committed Nov 17, 2022
1 parent d2c7c71 commit 4d4fd34
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/git/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package git

import (
"context"
"crypto/tls"
"fmt"
"net/http"
"strings"
Expand Down Expand Up @@ -50,8 +49,7 @@ var providers = map[ProviderType]func(string, *http.Client) (Provider, error){
func GetProvider(providerType ProviderType, baseURL string, insecure bool) (Provider, error) {
client := &http.Client{}
if insecure {
client.Transport = http.DefaultTransport
client.Transport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
client.Transport = apgit.DefaultTransportWithInsecure()
}

if providerType != "" {
Expand Down

0 comments on commit 4d4fd34

Please sign in to comment.