Skip to content

Commit

Permalink
fix creds
Browse files Browse the repository at this point in the history
Signed-off-by: alanprot <alanprot@gmail.com>
  • Loading branch information
alanprot committed Jun 10, 2024
1 parent a1e9a67 commit 0419db6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/clientconfig/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ func NewRoundTripperFromConfig(cfg config_util.HTTPClientConfig, transportConfig

if cfg.BasicAuth != nil {
// TODO(yeya24): expose UsernameFile as a config.
if len(cfg.BasicAuth.PasswordFile) >= 0 {
if len(cfg.BasicAuth.PasswordFile) > 0 {
rt = config_util.NewBasicAuthRoundTripper(config_util.NewInlineSecret(cfg.BasicAuth.Username), config_util.NewInlineSecret(cfg.BasicAuth.PasswordFile), rt)
} else if len(cfg.BasicAuth.Password) >= 0 {
} else if len(cfg.BasicAuth.Password) > 0 {
rt = config_util.NewBasicAuthRoundTripper(config_util.NewInlineSecret(cfg.BasicAuth.Username), config_util.NewInlineSecret(string(cfg.BasicAuth.Password)), rt)
}
}
Expand Down

0 comments on commit 0419db6

Please sign in to comment.