diff --git a/pkg/action/install.go b/pkg/action/install.go index 933747d26..8cffedc74 100644 --- a/pkg/action/install.go +++ b/pkg/action/install.go @@ -688,6 +688,10 @@ func (c *ChartPathOptions) LocateChart(name string, settings *cli.EnvSettings) ( // Host on URL (returned from url.Parse) contains the port if present. // This check ensures credentials are not passed between different // services on different ports. + if password, ok := u1.User.Password(); ok { + c.Username = u1.User.Username() + c.Password = password + } if c.PassCredentialsAll || (u1.Scheme == u2.Scheme && u1.Host == u2.Host) { dl.Options = append(dl.Options, getter.WithBasicAuth(c.Username, c.Password)) } else {