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 11, 2022
1 parent 3c5ff75 commit ee1fe90
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 ee1fe90

Please sign in to comment.