Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ microcks login http://localhost:8080 --sso --sso-launch-browser=false
if keycloakUrl == "null" {
localConfig.UpsertServer(config.Server{
Server: server,
InsecureTLS: true,
InsecureTLS: globalClientOpts.InsecureTLS,
KeycloakEnable: false,
})
fmt.Print("No login required...\n")
Expand Down Expand Up @@ -146,7 +146,7 @@ microcks login http://localhost:8080 --sso --sso-launch-browser=false

localConfig.UpsertServer(config.Server{
Server: server,
InsecureTLS: true,
InsecureTLS: globalClientOpts.InsecureTLS,
KeycloakEnable: true,
})
}
Expand Down
5 changes: 4 additions & 1 deletion pkg/connectors/microcks_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,11 @@ func NewClient(opts ClientOptions) (MicrocksClient, error) {
c.Verbose = opts.Verbose
}

if config.InsecureTLS || len(config.CaCertPaths) > 0 {
if config.InsecureTLS || c.InsecureTLS || len(config.CaCertPaths) > 0 {
tlsConfig := config.CreateTLSConfig()
if c.InsecureTLS {
tlsConfig.InsecureSkipVerify = true
}
tr := &http.Transport{
TLSClientConfig: tlsConfig,
}
Expand Down
Loading