Repository: helm/helm
Pull request #9794 (2021-06-11 10:03:14)

Add hint to missing dependency message
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. Make sure to read the Contributing Guide before submitting your PR: https://github.com/helm/helm/blob/main/CONTRIBUTING.md
2. If this PR closes another issue, add 'closes #<issue number>' somewhere in the PR summary. GitHub will automatically close that issue when this PR gets merged. Alternatively, adding 'refs #<issue number>' will not close the issue, but help provide the reviewer more context.-->

**What this PR does / why we need it**:

This PR adds a hint on how to resolve the situation to the 'missing dependency' error message.
Since switching to a shared library, this is the single biggest cause for confusion for developers in my team which could be solved by adding the  _"You may need to run `helm dependency build` to fetch missing dependencies."_ message at the end.

**Special notes for your reviewer**:

n/a

**If applicable**:
- [ ] this PR contains documentation
- [ ] this PR contains unit tests
- [ ] this PR has been tested for backwards compatibility


j6s: I have created #9823 for this PR. The PR also includes an update to the test-case for this error message.
bacongobbler: With a few exceptions, we try to avoid avoid referring to Helm CLI commands in `pkg/action`. This is because `pkg/action` can be used by other programs as a library, so asking the user to run `helm repo update` may be completely irrelevant.

Can you please look into alternative ways to provide this hint to the user? One way might be to capture the error from `pkg/action` in `cmd/helm`, then add the appropriate context around the error message.

Hope this helps.

Patch:
diff --git a/.golangci.yml b/.golangci.yml
index 5c2445711..491e648a1 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,5 +1,5 @@
 run:
-  timeout: 10m
+  timeout: 2m
 
 linters:
   disable-all: true
diff --git a/Makefile b/Makefile
index 555484fcd..d897bc939 100644
--- a/Makefile
+++ b/Makefile
@@ -113,7 +113,7 @@ test-coverage:
 
 .PHONY: test-style
 test-style:
-	GO111MODULE=on golangci-lint run
+	GO111MODULE=on golangci-lint run --timeout 5m0s
 	@scripts/validate-license.sh
 
 .PHONY: test-acceptance
diff --git a/cmd/helm/flags.go b/cmd/helm/flags.go
index aefa836c7..fe653625d 100644
--- a/cmd/helm/flags.go
+++ b/cmd/helm/flags.go
@@ -57,7 +57,6 @@ func addChartPathOptionsFlags(f *pflag.FlagSet, c *action.ChartPathOptions) {
 	f.StringVar(&c.KeyFile, "key-file", "", "identify HTTPS client using this SSL key file")
 	f.BoolVar(&c.InsecureSkipTLSverify, "insecure-skip-tls-verify", false, "skip tls certificate checks for the chart download")
 	f.StringVar(&c.CaFile, "ca-file", "", "verify certificates of HTTPS-enabled servers using this CA bundle")
-	f.BoolVar(&c.PassCredentialsAll, "pass-credentials", false, "pass credentials to all domains")
 }
 
 // bindOutputFlag will add the output flag to the given command and bind the
diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go
index 1766f8646..d0aab5c18 100644
--- a/cmd/helm/helm.go
+++ b/cmd/helm/helm.go
@@ -32,7 +32,6 @@ import (
 	"helm.sh/helm/v3/pkg/action"
 	"helm.sh/helm/v3/pkg/cli"
 	"helm.sh/helm/v3/pkg/gates"
-	"helm.sh/helm/v3/pkg/kube"
 	kubefake "helm.sh/helm/v3/pkg/kube/fake"
 	"helm.sh/helm/v3/pkg/release"
 	"helm.sh/helm/v3/pkg/storage/driver"
@@ -60,12 +59,6 @@ func warning(format string, v ...interface{}) {
 }
 
 func main() {
-	// Setting the name of the app for managedFields in the Kubernetes client.
-	// It is set here to the full name of "helm" so that renaming of helm to
-	// another name (e.g., helm2 or helm3) does not change the name of the
-	// manager as picked up by the automated name detection.
-	kube.ManagedFieldsManager = "helm"
-
 	actionConfig := new(action.Configuration)
 	cmd, err := newRootCmd(actionConfig, os.Stdout, os.Args[1:])
 	if err != nil {
diff --git a/cmd/helm/install.go b/cmd/helm/install.go
index 04419d730..ae02165cb 100644
--- a/cmd/helm/install.go
+++ b/cmd/helm/install.go
@@ -214,6 +214,7 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options
 		// As of Helm 2.4.0, this is treated as a stopping condition:
 		// https://github.com/helm/helm/issues/2209
 		if err := action.CheckDependencies(chartRequested, req); err != nil {
+			err = errors.Wrap(err, "An error occurred while checking for chart dependencies. You may need to run `helm dependency build` to fetch missing dependencies")
 			if client.DependencyUpdate {
 				man := &downloader.Manager{
 					Out:              out,
diff --git a/cmd/helm/repo_add.go b/cmd/helm/repo_add.go
index beafb31cf..e07eb8685 100644
--- a/cmd/helm/repo_add.go
+++ b/cmd/helm/repo_add.go
@@ -48,7 +48,6 @@ type repoAddOptions struct {
 	url                  string
 	username             string
 	password             string
-	passCredentialsAll   bool
 	forceUpdate          bool
 	allowDeprecatedRepos bool
 
@@ -92,7 +91,6 @@ func newRepoAddCmd(out io.Writer) *cobra.Command {
 	f.StringVar(&o.caFile, "ca-file", "", "verify certificates of HTTPS-enabled servers using this CA bundle")
 	f.BoolVar(&o.insecureSkipTLSverify, "insecure-skip-tls-verify", false, "skip tls certificate checks for the repository")
 	f.BoolVar(&o.allowDeprecatedRepos, "allow-deprecated-repos", false, "by default, this command will not allow adding official repos that have been permanently deleted. This disables that behavior")
-	f.BoolVar(&o.passCredentialsAll, "pass-credentials", false, "pass credentials to all domains")
 
 	return cmd
 }
@@ -158,7 +156,6 @@ func (o *repoAddOptions) run(out io.Writer) error {
 		URL:                   o.url,
 		Username:              o.username,
 		Password:              o.password,
-		PassCredentialsAll:    o.passCredentialsAll,
 		CertFile:              o.certFile,
 		KeyFile:               o.keyFile,
 		CAFile:                o.caFile,
diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go
index 3bd392d1d..e62e6ed35 100644
--- a/cmd/helm/upgrade.go
+++ b/cmd/helm/upgrade.go
@@ -146,6 +146,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
 			}
 			if req := ch.Metadata.Dependencies; req != nil {
 				if err := action.CheckDependencies(ch, req); err != nil {
+					err = errors.Wrap(err, "An error occurred while checking for chart dependencies. You may need to run `helm dependency build` to fetch missing dependencies")
 					if client.DependencyUpdate {
 						man := &downloader.Manager{
 							Out:              out,
diff --git a/internal/resolver/resolver.go b/internal/resolver/resolver.go
index 9c65d2965..de0634093 100644
--- a/internal/resolver/resolver.go
+++ b/internal/resolver/resolver.go
@@ -57,11 +57,6 @@ func (r *Resolver) Resolve(reqs []*chart.Dependency, repoNames map[string]string
 	locked := make([]*chart.Dependency, len(reqs))
 	missing := []string{}
 	for i, d := range reqs {
-		constraint, err := semver.NewConstraint(d.Version)
-		if err != nil {
-			return nil, errors.Wrapf(err, "dependency %q has an invalid version/constraint format", d.Name)
-		}
-
 		if d.Repository == "" {
 			// Local chart subfolder
 			if _, err := GetLocalPath(filepath.Join("charts", d.Name), r.chartpath); err != nil {
@@ -82,22 +77,13 @@ func (r *Resolver) Resolve(reqs []*chart.Dependency, repoNames map[string]string
 				return nil, err
 			}
 
+			// The version of the chart locked will be the version of the chart
+			// currently listed in the file system within the chart.
 			ch, err := loader.LoadDir(chartpath)
 			if err != nil {
 				return nil, err
 			}
 
-			v, err := semver.NewVersion(ch.Metadata.Version)
-			if err != nil {
-				// Not a legit entry.
-				continue
-			}
-
-			if !constraint.Check(v) {
-				missing = append(missing, d.Name)
-				continue
-			}
-
 			locked[i] = &chart.Dependency{
 				Name:       d.Name,
 				Repository: d.Repository,
@@ -106,6 +92,11 @@ func (r *Resolver) Resolve(reqs []*chart.Dependency, repoNames map[string]string
 			continue
 		}
 
+		constraint, err := semver.NewConstraint(d.Version)
+		if err != nil {
+			return nil, errors.Wrapf(err, "dependency %q has an invalid version/constraint format", d.Name)
+		}
+
 		repoName := repoNames[d.Name]
 		// if the repository was not defined, but the dependency defines a repository url, bypass the cache
 		if repoName == "" && d.Repository != "" {
diff --git a/pkg/action/install.go b/pkg/action/install.go
index 933747d26..c33d6bf3c 100644
--- a/pkg/action/install.go
+++ b/pkg/action/install.go
@@ -20,7 +20,6 @@ import (
 	"bytes"
 	"fmt"
 	"io/ioutil"
-	"net/url"
 	"os"
 	"path"
 	"path/filepath"
@@ -114,7 +113,6 @@ type ChartPathOptions struct {
 	InsecureSkipTLSverify bool   // --insecure-skip-verify
 	Keyring               string // --keyring
 	Password              string // --password
-	PassCredentialsAll    bool   // --pass-credentials
 	RepoURL               string // --repo
 	Username              string // --username
 	Verify                bool   // --verify
@@ -656,7 +654,7 @@ func (c *ChartPathOptions) LocateChart(name string, settings *cli.EnvSettings) (
 		Keyring: c.Keyring,
 		Getters: getter.All(settings),
 		Options: []getter.Option{
-			getter.WithPassCredentialsAll(c.PassCredentialsAll),
+			getter.WithBasicAuth(c.Username, c.Password),
 			getter.WithTLSClientConfig(c.CertFile, c.KeyFile, c.CaFile),
 			getter.WithInsecureSkipVerifyTLS(c.InsecureSkipTLSverify),
 		},
@@ -667,34 +665,12 @@ func (c *ChartPathOptions) LocateChart(name string, settings *cli.EnvSettings) (
 		dl.Verify = downloader.VerifyAlways
 	}
 	if c.RepoURL != "" {
-		chartURL, err := repo.FindChartInAuthAndTLSAndPassRepoURL(c.RepoURL, c.Username, c.Password, name, version,
-			c.CertFile, c.KeyFile, c.CaFile, c.InsecureSkipTLSverify, c.PassCredentialsAll, getter.All(settings))
+		chartURL, err := repo.FindChartInAuthAndTLSRepoURL(c.RepoURL, c.Username, c.Password, name, version,
+			c.CertFile, c.KeyFile, c.CaFile, c.InsecureSkipTLSverify, getter.All(settings))
 		if err != nil {
 			return "", err
 		}
 		name = chartURL
-
-		// Only pass the user/pass on when the user has said to or when the
-		// location of the chart repo and the chart are the same domain.
-		u1, err := url.Parse(c.RepoURL)
-		if err != nil {
-			return "", err
-		}
-		u2, err := url.Parse(chartURL)
-		if err != nil {
-			return "", err
-		}
-
-		// 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 c.PassCredentialsAll || (u1.Scheme == u2.Scheme && u1.Host == u2.Host) {
-			dl.Options = append(dl.Options, getter.WithBasicAuth(c.Username, c.Password))
-		} else {
-			dl.Options = append(dl.Options, getter.WithBasicAuth("", ""))
-		}
-	} else {
-		dl.Options = append(dl.Options, getter.WithBasicAuth(c.Username, c.Password))
 	}
 
 	if err := os.MkdirAll(settings.RepositoryCache, 0755); err != nil {
diff --git a/pkg/action/pull.go b/pkg/action/pull.go
index fa1247054..04faa3b6b 100644
--- a/pkg/action/pull.go
+++ b/pkg/action/pull.go
@@ -82,7 +82,6 @@ func (p *Pull) Run(chartRef string) (string, error) {
 		Getters: getter.All(p.Settings),
 		Options: []getter.Option{
 			getter.WithBasicAuth(p.Username, p.Password),
-			getter.WithPassCredentialsAll(p.PassCredentialsAll),
 			getter.WithTLSClientConfig(p.CertFile, p.KeyFile, p.CaFile),
 			getter.WithInsecureSkipVerifyTLS(p.InsecureSkipTLSverify),
 		},
@@ -119,7 +118,7 @@ func (p *Pull) Run(chartRef string) (string, error) {
 	}
 
 	if p.RepoURL != "" {
-		chartURL, err := repo.FindChartInAuthAndTLSAndPassRepoURL(p.RepoURL, p.Username, p.Password, chartRef, p.Version, p.CertFile, p.KeyFile, p.CaFile, p.InsecureSkipTLSverify, p.PassCredentialsAll, getter.All(p.Settings))
+		chartURL, err := repo.FindChartInAuthAndTLSRepoURL(p.RepoURL, p.Username, p.Password, chartRef, p.Version, p.CertFile, p.KeyFile, p.CaFile, p.InsecureSkipTLSverify, getter.All(p.Settings))
 		if err != nil {
 			return out.String(), err
 		}
diff --git a/pkg/downloader/chart_downloader.go b/pkg/downloader/chart_downloader.go
index 575c94151..6c600bebb 100644
--- a/pkg/downloader/chart_downloader.go
+++ b/pkg/downloader/chart_downloader.go
@@ -158,6 +158,7 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, er
 	if err != nil {
 		return nil, errors.Errorf("invalid chart URL format: %s", ref)
 	}
+	c.Options = append(c.Options, getter.WithURL(ref))
 
 	rf, err := loadRepoConfig(c.RepositoryConfig)
 	if err != nil {
@@ -176,8 +177,6 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, er
 			// If there is no special config, return the default HTTP client and
 			// swallow the error.
 			if err == ErrNoOwnerRepo {
-				// Make sure to add the ref URL as the URL for the getter
-				c.Options = append(c.Options, getter.WithURL(ref))
 				return u, nil
 			}
 			return u, err
@@ -196,7 +195,6 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, er
 			c.Options = append(
 				c.Options,
 				getter.WithBasicAuth(rc.Username, rc.Password),
-				getter.WithPassCredentialsAll(rc.PassCredentialsAll),
 			)
 		}
 		return u, nil
@@ -216,10 +214,6 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, er
 		return u, err
 	}
 
-	// Now that we have the chart repository information we can use that URL
-	// to set the URL for the getter.
-	c.Options = append(c.Options, getter.WithURL(rc.URL))
-
 	r, err := repo.NewChartRepository(rc, c.Getters)
 	if err != nil {
 		return u, err
@@ -230,10 +224,7 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, er
 			c.Options = append(c.Options, getter.WithTLSClientConfig(r.Config.CertFile, r.Config.KeyFile, r.Config.CAFile))
 		}
 		if r.Config.Username != "" && r.Config.Password != "" {
-			c.Options = append(c.Options,
-				getter.WithBasicAuth(r.Config.Username, r.Config.Password),
-				getter.WithPassCredentialsAll(r.Config.PassCredentialsAll),
-			)
+			c.Options = append(c.Options, getter.WithBasicAuth(r.Config.Username, r.Config.Password))
 		}
 	}
 
diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go
index ff5f9c4e7..2dedc5757 100644
--- a/pkg/downloader/manager.go
+++ b/pkg/downloader/manager.go
@@ -310,7 +310,7 @@ func (m *Manager) downloadAll(deps []*chart.Dependency) error {
 
 		// Any failure to resolve/download a chart should fail:
 		// https://github.com/helm/helm/issues/1439
-		churl, username, password, insecureskiptlsverify, passcredentialsall, caFile, certFile, keyFile, err := m.findChartURL(dep.Name, dep.Version, dep.Repository, repos)
+		churl, username, password, insecureskiptlsverify, err := m.findChartURL(dep.Name, dep.Version, dep.Repository, repos)
 		if err != nil {
 			saveError = errors.Wrapf(err, "could not find %s", churl)
 			break
@@ -332,9 +332,7 @@ func (m *Manager) downloadAll(deps []*chart.Dependency) error {
 			Getters:          m.Getters,
 			Options: []getter.Option{
 				getter.WithBasicAuth(username, password),
-				getter.WithPassCredentialsAll(passcredentialsall),
 				getter.WithInsecureSkipVerifyTLS(insecureskiptlsverify),
-				getter.WithTLSClientConfig(certFile, keyFile, caFile),
 			},
 		}
 
@@ -688,9 +686,9 @@ func (m *Manager) parallelRepoUpdate(repos []*repo.Entry) error {
 // repoURL is the repository to search
 //
 // If it finds a URL that is "relative", it will prepend the repoURL.
-func (m *Manager) findChartURL(name, version, repoURL string, repos map[string]*repo.ChartRepository) (url, username, password string, insecureskiptlsverify, passcredentialsall bool, caFile, certFile, keyFile string, err error) {
+func (m *Manager) findChartURL(name, version, repoURL string, repos map[string]*repo.ChartRepository) (url, username, password string, insecureskiptlsverify bool, err error) {
 	if strings.HasPrefix(repoURL, "oci://") {
-		return fmt.Sprintf("%s/%s:%s", repoURL, name, version), "", "", false, false, "", "", "", nil
+		return fmt.Sprintf("%s/%s:%s", repoURL, name, version), "", "", false, nil
 	}
 
 	for _, cr := range repos {
@@ -712,20 +710,16 @@ func (m *Manager) findChartURL(name, version, repoURL string, repos map[string]*
 			}
 			username = cr.Config.Username
 			password = cr.Config.Password
-			passcredentialsall = cr.Config.PassCredentialsAll
 			insecureskiptlsverify = cr.Config.InsecureSkipTLSverify
-			caFile = cr.Config.CAFile
-			certFile = cr.Config.CertFile
-			keyFile = cr.Config.KeyFile
 			return
 		}
 	}
-	url, err = repo.FindChartInRepoURL(repoURL, name, version, certFile, keyFile, caFile, m.Getters)
+	url, err = repo.FindChartInRepoURL(repoURL, name, version, "", "", "", m.Getters)
 	if err == nil {
-		return url, username, password, false, false, "", "", "", err
+		return url, username, password, false, err
 	}
 	err = errors.Errorf("chart %s not found in %s: %s", name, repoURL, err)
-	return url, username, password, false, false, "", "", "", err
+	return url, username, password, false, err
 }
 
 // findEntryByName finds an entry in the chart repository whose name matches the given name.
diff --git a/pkg/getter/getter.go b/pkg/getter/getter.go
index 78add728a..465348456 100644
--- a/pkg/getter/getter.go
+++ b/pkg/getter/getter.go
@@ -38,7 +38,6 @@ type options struct {
 	insecureSkipVerifyTLS bool
 	username              string
 	password              string
-	passCredentialsAll    bool
 	userAgent             string
 	version               string
 	registryClient        *registry.Client
@@ -65,12 +64,6 @@ func WithBasicAuth(username, password string) Option {
 	}
 }
 
-func WithPassCredentialsAll(pass bool) Option {
-	return func(opts *options) {
-		opts.passCredentialsAll = pass
-	}
-}
-
 // WithUserAgent sets the request's User-Agent header to use the provided agent name.
 func WithUserAgent(userAgent string) Option {
 	return func(opts *options) {
diff --git a/pkg/getter/httpgetter.go b/pkg/getter/httpgetter.go
index 454eb6eb6..9920cf14c 100644
--- a/pkg/getter/httpgetter.go
+++ b/pkg/getter/httpgetter.go
@@ -20,7 +20,6 @@ import (
 	"crypto/tls"
 	"io"
 	"net/http"
-	"net/url"
 
 	"github.com/pkg/errors"
 
@@ -43,11 +42,13 @@ func (g *HTTPGetter) Get(href string, options ...Option) (*bytes.Buffer, error)
 }
 
 func (g *HTTPGetter) get(href string) (*bytes.Buffer, error) {
+	buf := bytes.NewBuffer(nil)
+
 	// Set a helm specific user agent so that a repo server and metrics can
 	// separate helm calls from other tools interacting with repos.
-	req, err := http.NewRequest(http.MethodGet, href, nil)
+	req, err := http.NewRequest("GET", href, nil)
 	if err != nil {
-		return nil, err
+		return buf, err
 	}
 
 	req.Header.Set("User-Agent", version.GetUserAgent())
@@ -55,24 +56,8 @@ func (g *HTTPGetter) get(href string) (*bytes.Buffer, error) {
 		req.Header.Set("User-Agent", g.opts.userAgent)
 	}
 
-	// Before setting the basic auth credentials, make sure the URL associated
-	// with the basic auth is the one being fetched.
-	u1, err := url.Parse(g.opts.url)
-	if err != nil {
-		return nil, errors.Wrap(err, "Unable to parse getter URL")
-	}
-	u2, err := url.Parse(href)
-	if err != nil {
-		return nil, errors.Wrap(err, "Unable to parse URL getting from")
-	}
-
-	// 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 g.opts.passCredentialsAll || (u1.Scheme == u2.Scheme && u1.Host == u2.Host) {
-		if g.opts.username != "" && g.opts.password != "" {
-			req.SetBasicAuth(g.opts.username, g.opts.password)
-		}
+	if g.opts.username != "" && g.opts.password != "" {
+		req.SetBasicAuth(g.opts.username, g.opts.password)
 	}
 
 	client, err := g.httpClient()
@@ -82,15 +67,14 @@ func (g *HTTPGetter) get(href string) (*bytes.Buffer, error) {
 
 	resp, err := client.Do(req)
 	if err != nil {
-		return nil, err
+		return buf, err
 	}
-	defer resp.Body.Close()
-	if resp.StatusCode != http.StatusOK {
-		return nil, errors.Errorf("failed to fetch %s : %s", href, resp.Status)
+	if resp.StatusCode != 200 {
+		return buf, errors.Errorf("failed to fetch %s : %s", href, resp.Status)
 	}
 
-	buf := bytes.NewBuffer(nil)
 	_, err = io.Copy(buf, resp.Body)
+	resp.Body.Close()
 	return buf, err
 }
 
diff --git a/pkg/kube/client.go b/pkg/kube/client.go
index 76a832b0e..2565d1832 100644
--- a/pkg/kube/client.go
+++ b/pkg/kube/client.go
@@ -21,8 +21,6 @@ import (
 	"encoding/json"
 	"fmt"
 	"io"
-	"os"
-	"path/filepath"
 	"strings"
 	"sync"
 	"time"
@@ -57,10 +55,6 @@ var ErrNoObjectsVisited = errors.New("no objects visited")
 
 var metadataAccessor = meta.NewAccessor()
 
-// ManagedFieldsManager is the name of the manager of Kubernetes managedFields
-// first introduced in Kubernetes 1.18
-var ManagedFieldsManager string
-
 // Client represents a client capable of communicating with the Kubernetes API.
 type Client struct {
 	Factory Factory
@@ -106,7 +100,7 @@ func (c *Client) getKubeClient() (*kubernetes.Clientset, error) {
 	return c.kubeClient, err
 }
 
-// IsReachable tests connectivity to the cluster.
+// IsReachable tests connectivity to the cluster
 func (c *Client) IsReachable() error {
 	client, err := c.getKubeClient()
 	if err == genericclioptions.ErrEmptyConfig {
@@ -132,7 +126,7 @@ func (c *Client) Create(resources ResourceList) (*Result, error) {
 	return &Result{Created: resources}, nil
 }
 
-// Wait waits up to the given timeout for the specified resources to be ready.
+// Wait up to the given timeout for the specified resources to be ready
 func (c *Client) Wait(resources ResourceList, timeout time.Duration) error {
 	cs, err := c.getKubeClient()
 	if err != nil {
@@ -212,7 +206,7 @@ func (c *Client) Update(original, target ResourceList, force bool) (*Result, err
 			return err
 		}
 
-		helper := resource.NewHelper(info.Client, info.Mapping).WithFieldManager(getManagedFieldsManager())
+		helper := resource.NewHelper(info.Client, info.Mapping)
 		if _, err := helper.Get(info.Namespace, info.Name); err != nil {
 			if !apierrors.IsNotFound(err) {
 				return errors.Wrap(err, "could not get information about the resource")
@@ -330,7 +324,7 @@ func (c *Client) watchTimeout(t time.Duration) func(*resource.Info) error {
 
 // WatchUntilReady watches the resources given and waits until it is ready.
 //
-// This method is mainly for hook implementations. It watches for a resource to
+// This function is mainly for hook implementations. It watches for a resource to
 // hit a particular milestone. The milestone depends on the Kind.
 //
 // For most kinds, it checks to see if the resource is marked as Added or Modified
@@ -365,26 +359,6 @@ func perform(infos ResourceList, fn func(*resource.Info) error) error {
 	return nil
 }
 
-// getManagedFieldsManager returns the manager string. If one was set it will be returned.
-// Otherwise, one is calculated based on the name of the binary.
-func getManagedFieldsManager() string {
-
-	// When a manager is explicitly set use it
-	if ManagedFieldsManager != "" {
-		return ManagedFieldsManager
-	}
-
-	// When no manager is set and no calling application can be found it is unknown
-	if len(os.Args[0]) == 0 {
-		return "unknown"
-	}
-
-	// When there is an application that can be determined and no set manager
-	// use the base name. This is one of the ways Kubernetes libs handle figuring
-	// names out.
-	return filepath.Base(os.Args[0])
-}
-
 func batchPerform(infos ResourceList, fn func(*resource.Info) error, errs chan<- error) {
 	var kind string
 	var wg sync.WaitGroup
@@ -403,7 +377,7 @@ func batchPerform(infos ResourceList, fn func(*resource.Info) error, errs chan<-
 }
 
 func createResource(info *resource.Info) error {
-	obj, err := resource.NewHelper(info.Client, info.Mapping).WithFieldManager(getManagedFieldsManager()).Create(info.Namespace, true, info.Object)
+	obj, err := resource.NewHelper(info.Client, info.Mapping).Create(info.Namespace, true, info.Object)
 	if err != nil {
 		return err
 	}
@@ -413,7 +387,7 @@ func createResource(info *resource.Info) error {
 func deleteResource(info *resource.Info) error {
 	policy := metav1.DeletePropagationBackground
 	opts := &metav1.DeleteOptions{PropagationPolicy: &policy}
-	_, err := resource.NewHelper(info.Client, info.Mapping).WithFieldManager(getManagedFieldsManager()).DeleteWithOptions(info.Namespace, info.Name, opts)
+	_, err := resource.NewHelper(info.Client, info.Mapping).DeleteWithOptions(info.Namespace, info.Name, opts)
 	return err
 }
 
@@ -428,7 +402,7 @@ func createPatch(target *resource.Info, current runtime.Object) ([]byte, types.P
 	}
 
 	// Fetch the current object for the three way merge
-	helper := resource.NewHelper(target.Client, target.Mapping).WithFieldManager(getManagedFieldsManager())
+	helper := resource.NewHelper(target.Client, target.Mapping)
 	currentObj, err := helper.Get(target.Namespace, target.Name)
 	if err != nil && !apierrors.IsNotFound(err) {
 		return nil, types.StrategicMergePatchType, errors.Wrapf(err, "unable to get data for current object %s/%s", target.Namespace, target.Name)
@@ -470,7 +444,7 @@ func createPatch(target *resource.Info, current runtime.Object) ([]byte, types.P
 func updateResource(c *Client, target *resource.Info, currentObj runtime.Object, force bool) error {
 	var (
 		obj    runtime.Object
-		helper = resource.NewHelper(target.Client, target.Mapping).WithFieldManager(getManagedFieldsManager())
+		helper = resource.NewHelper(target.Client, target.Mapping)
 		kind   = target.Mapping.GroupVersionKind.Kind
 	)
 
diff --git a/pkg/kube/interface.go b/pkg/kube/interface.go
index 59a4cbdcc..545985996 100644
--- a/pkg/kube/interface.go
+++ b/pkg/kube/interface.go
@@ -30,19 +30,14 @@ type Interface interface {
 	// Create creates one or more resources.
 	Create(resources ResourceList) (*Result, error)
 
-	// Wait waits up to the given timeout for the specified resources to be ready.
 	Wait(resources ResourceList, timeout time.Duration) error
 
-	// WaitWithJobs wait up to the given timeout for the specified resources to be ready, including jobs.
 	WaitWithJobs(resources ResourceList, timeout time.Duration) error
 
 	// Delete destroys one or more resources.
 	Delete(resources ResourceList) (*Result, []error)
 
-	// WatchUntilReady watches the resources given and waits until it is ready.
-	//
-	// This method is mainly for hook implementations. It watches for a resource to
-	// hit a particular milestone. The milestone depends on the Kind.
+	// Watch the resource in reader until it is "ready". This method
 	//
 	// For Jobs, "ready" means the Job ran to completion (exited without error).
 	// For Pods, "ready" means the Pod phase is marked "succeeded".
@@ -54,9 +49,9 @@ type Interface interface {
 	// if it doesn't exist.
 	Update(original, target ResourceList, force bool) (*Result, error)
 
-	// Build creates a resource list from a Reader.
+	// Build creates a resource list from a Reader
 	//
-	// Reader must contain a YAML stream (one or more YAML documents separated
+	// reader must contain a YAML stream (one or more YAML documents separated
 	// by "\n---\n")
 	//
 	// Validates against OpenAPI schema if validate is true.
@@ -66,7 +61,7 @@ type Interface interface {
 	// and returns said phase (PodSucceeded or PodFailed qualify).
 	WaitAndGetCompletedPodPhase(name string, timeout time.Duration) (v1.PodPhase, error)
 
-	// IsReachable checks whether the client is able to connect to the cluster.
+	// isReachable checks whether the client is able to connect to the cluster
 	IsReachable() error
 }
 
diff --git a/pkg/repo/chartrepo.go b/pkg/repo/chartrepo.go
index 67ede93fd..09b94fd42 100644
--- a/pkg/repo/chartrepo.go
+++ b/pkg/repo/chartrepo.go
@@ -48,7 +48,6 @@ type Entry struct {
 	KeyFile               string `json:"keyFile"`
 	CAFile                string `json:"caFile"`
 	InsecureSkipTLSverify bool   `json:"insecure_skip_tls_verify"`
-	PassCredentialsAll    bool   `json:"pass_credentials_all"`
 }
 
 // ChartRepository represents a chart repository
@@ -130,7 +129,6 @@ func (r *ChartRepository) DownloadIndexFile() (string, error) {
 		getter.WithInsecureSkipVerifyTLS(r.Config.InsecureSkipTLSverify),
 		getter.WithTLSClientConfig(r.Config.CertFile, r.Config.KeyFile, r.Config.CAFile),
 		getter.WithBasicAuth(r.Config.Username, r.Config.Password),
-		getter.WithPassCredentialsAll(r.Config.PassCredentialsAll),
 	)
 	if err != nil {
 		return "", err
@@ -219,15 +217,6 @@ func FindChartInAuthRepoURL(repoURL, username, password, chartName, chartVersion
 // but it also receives credentials and TLS verify flag for the chart repository.
 // TODO Helm 4, FindChartInAuthAndTLSRepoURL should be integrated into FindChartInAuthRepoURL.
 func FindChartInAuthAndTLSRepoURL(repoURL, username, password, chartName, chartVersion, certFile, keyFile, caFile string, insecureSkipTLSverify bool, getters getter.Providers) (string, error) {
-	return FindChartInAuthAndTLSAndPassRepoURL(repoURL, username, password, chartName, chartVersion, certFile, keyFile, caFile, false, false, getters)
-}
-
-// FindChartInAuthAndTLSAndPassRepoURL finds chart in chart repository pointed by repoURL
-// without adding repo to repositories, like FindChartInRepoURL,
-// but it also receives credentials, TLS verify flag, and if credentials should
-// be passed on to other domains.
-// TODO Helm 4, FindChartInAuthAndTLSAndPassRepoURL should be integrated into FindChartInAuthRepoURL.
-func FindChartInAuthAndTLSAndPassRepoURL(repoURL, username, password, chartName, chartVersion, certFile, keyFile, caFile string, insecureSkipTLSverify, passCredentialsAll bool, getters getter.Providers) (string, error) {
 
 	// Download and write the index file to a temporary location
 	buf := make([]byte, 20)
@@ -238,7 +227,6 @@ func FindChartInAuthAndTLSAndPassRepoURL(repoURL, username, password, chartName,
 		URL:                   repoURL,
 		Username:              username,
 		Password:              password,
-		PassCredentialsAll:    passCredentialsAll,
 		CertFile:              certFile,
 		KeyFile:               keyFile,
 		CAFile:                caFile,


Test patch:
diff --git a/cmd/helm/install_test.go b/cmd/helm/install_test.go
index b7349e3d5..0fae79534 100644
--- a/cmd/helm/install_test.go
+++ b/cmd/helm/install_test.go
@@ -18,39 +18,10 @@ package main
 
 import (
 	"fmt"
-	"net/http"
-	"net/http/httptest"
-	"path/filepath"
 	"testing"
-
-	"helm.sh/helm/v3/pkg/repo/repotest"
 )
 
 func TestInstall(t *testing.T) {
-	srv, err := repotest.NewTempServerWithCleanup(t, "testdata/testcharts/*.tgz*")
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer srv.Stop()
-
-	srv.WithMiddleware(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		username, password, ok := r.BasicAuth()
-		if !ok || username != "username" || password != "password" {
-			t.Errorf("Expected request to use basic auth and for username == 'username' and password == 'password', got '%v', '%s', '%s'", ok, username, password)
-		}
-	}))
-
-	srv2 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		http.FileServer(http.Dir(srv.Root())).ServeHTTP(w, r)
-	}))
-	defer srv2.Close()
-
-	if err := srv.LinkIndices(); err != nil {
-		t.Fatal(err)
-	}
-
-	repoFile := filepath.Join(srv.Root(), "repositories.yaml")
-
 	tests := []cmdTestCase{
 		// Install, base case
 		{
@@ -236,22 +207,6 @@ func TestInstall(t *testing.T) {
 			name: "install chart with only crds",
 			cmd:  "install crd-test testdata/testcharts/chart-with-only-crds --namespace default",
 		},
-		// Verify the user/pass works
-		{
-			name:   "basic install with credentials",
-			cmd:    "install aeneas reqtest --namespace default --repo " + srv.URL() + " --username username --password password",
-			golden: "output/install.txt",
-		},
-		{
-			name:   "basic install with credentials",
-			cmd:    "install aeneas reqtest --namespace default --repo " + srv2.URL + " --username username --password password --pass-credentials",
-			golden: "output/install.txt",
-		},
-		{
-			name:   "basic install with credentials and no repo",
-			cmd:    fmt.Sprintf("install aeneas test/reqtest --username username --password password --repository-config %s --repository-cache %s", repoFile, srv.Root()),
-			golden: "output/install.txt",
-		},
 	}
 
 	runTestActionCmd(t, tests)
diff --git a/cmd/helm/pull_test.go b/cmd/helm/pull_test.go
index 4d86a5029..51cdfdfa4 100644
--- a/cmd/helm/pull_test.go
+++ b/cmd/helm/pull_test.go
@@ -18,8 +18,6 @@ package main
 
 import (
 	"fmt"
-	"net/http"
-	"net/http/httptest"
 	"os"
 	"path/filepath"
 	"testing"
@@ -252,115 +250,6 @@ func TestPullCmd(t *testing.T) {
 	}
 }
 
-func TestPullWithCredentialsCmd(t *testing.T) {
-	srv, err := repotest.NewTempServerWithCleanup(t, "testdata/testcharts/*.tgz*")
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer srv.Stop()
-
-	srv.WithMiddleware(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		username, password, ok := r.BasicAuth()
-		if !ok || username != "username" || password != "password" {
-			t.Errorf("Expected request to use basic auth and for username == 'username' and password == 'password', got '%v', '%s', '%s'", ok, username, password)
-		}
-	}))
-
-	srv2 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		http.FileServer(http.Dir(srv.Root())).ServeHTTP(w, r)
-	}))
-	defer srv2.Close()
-
-	if err := srv.LinkIndices(); err != nil {
-		t.Fatal(err)
-	}
-
-	// all flags will get "-d outdir" appended.
-	tests := []struct {
-		name         string
-		args         string
-		existFile    string
-		existDir     string
-		wantError    bool
-		wantErrorMsg string
-		expectFile   string
-		expectDir    bool
-	}{
-		{
-			name:       "Chart fetch using repo URL",
-			expectFile: "./signtest-0.1.0.tgz",
-			args:       "signtest --repo " + srv.URL() + " --username username --password password",
-		},
-		{
-			name:      "Fail fetching non-existent chart on repo URL",
-			args:      "someChart --repo " + srv.URL() + " --username username --password password",
-			wantError: true,
-		},
-		{
-			name:       "Specific version chart fetch using repo URL",
-			expectFile: "./signtest-0.1.0.tgz",
-			args:       "signtest --version=0.1.0 --repo " + srv.URL() + " --username username --password password",
-		},
-		{
-			name:      "Specific version chart fetch using repo URL",
-			args:      "signtest --version=0.2.0 --repo " + srv.URL() + " --username username --password password",
-			wantError: true,
-		},
-		{
-			name:       "Chart located on different domain with credentials passed",
-			args:       "reqtest --repo " + srv2.URL + " --username username --password password --pass-credentials",
-			expectFile: "./reqtest-0.1.0.tgz",
-		},
-	}
-
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			outdir := srv.Root()
-			cmd := fmt.Sprintf("pull %s -d '%s' --repository-config %s --repository-cache %s --registry-config %s",
-				tt.args,
-				outdir,
-				filepath.Join(outdir, "repositories.yaml"),
-				outdir,
-				filepath.Join(outdir, "config.json"),
-			)
-			// Create file or Dir before helm pull --untar, see: https://github.com/helm/helm/issues/7182
-			if tt.existFile != "" {
-				file := filepath.Join(outdir, tt.existFile)
-				_, err := os.Create(file)
-				if err != nil {
-					t.Fatal(err)
-				}
-			}
-			if tt.existDir != "" {
-				file := filepath.Join(outdir, tt.existDir)
-				err := os.Mkdir(file, 0755)
-				if err != nil {
-					t.Fatal(err)
-				}
-			}
-			_, _, err := executeActionCommand(cmd)
-			if err != nil {
-				if tt.wantError {
-					if tt.wantErrorMsg != "" && tt.wantErrorMsg == err.Error() {
-						t.Fatalf("Actual error %s, not equal to expected error %s", err, tt.wantErrorMsg)
-					}
-					return
-				}
-				t.Fatalf("%q reported error: %s", tt.name, err)
-			}
-
-			ef := filepath.Join(outdir, tt.expectFile)
-			fi, err := os.Stat(ef)
-			if err != nil {
-				t.Errorf("%q: expected a file at %s. %s", tt.name, ef, err)
-			}
-			if fi.IsDir() != tt.expectDir {
-				t.Errorf("%q: expected directory=%t, but it's not.", tt.name, tt.expectDir)
-			}
-		})
-	}
-}
-
 func TestPullVersionCompletion(t *testing.T) {
 	repoFile := "testdata/helmhome/helm/repositories.yaml"
 	repoCache := "testdata/helmhome/helm/repository"
diff --git a/cmd/helm/testdata/output/upgrade-with-missing-dependencies.txt b/cmd/helm/testdata/output/upgrade-with-missing-dependencies.txt
index de62e1d2a..adf2ae899 100644
--- a/cmd/helm/testdata/output/upgrade-with-missing-dependencies.txt
+++ b/cmd/helm/testdata/output/upgrade-with-missing-dependencies.txt
@@ -1,1 +1,1 @@
-Error: found in Chart.yaml, but missing in charts/ directory: reqsubchart2
+Error: An error occurred while checking for chart dependencies. You may need to run `helm dependency build` to fetch missing dependencies: found in Chart.yaml, but missing in charts/ directory: reqsubchart2
diff --git a/internal/resolver/resolver_test.go b/internal/resolver/resolver_test.go
index bc84ba952..204a72622 100644
--- a/internal/resolver/resolver_test.go
+++ b/internal/resolver/resolver_test.go
@@ -28,18 +28,6 @@ func TestResolve(t *testing.T) {
 		expect *chart.Lock
 		err    bool
 	}{
-		{
-			name: "repo from invalid version",
-			req: []*chart.Dependency{
-				{Name: "base", Repository: "file://base", Version: "1.1.0"},
-			},
-			expect: &chart.Lock{
-				Dependencies: []*chart.Dependency{
-					{Name: "base", Repository: "file://base", Version: "0.1.0"},
-				},
-			},
-			err: true,
-		},
 		{
 			name: "version failure",
 			req: []*chart.Dependency{
diff --git a/pkg/downloader/chart_downloader_test.go b/pkg/downloader/chart_downloader_test.go
index 38a06671c..334d7aaa1 100644
--- a/pkg/downloader/chart_downloader_test.go
+++ b/pkg/downloader/chart_downloader_test.go
@@ -205,7 +205,6 @@ func TestDownloadTo(t *testing.T) {
 		}),
 		Options: []getter.Option{
 			getter.WithBasicAuth("username", "password"),
-			getter.WithPassCredentialsAll(false),
 		},
 	}
 	cname := "/signtest-0.1.0.tgz"
diff --git a/pkg/downloader/manager_test.go b/pkg/downloader/manager_test.go
index b8da42cd2..ba6ecedf5 100644
--- a/pkg/downloader/manager_test.go
+++ b/pkg/downloader/manager_test.go
@@ -81,7 +81,7 @@ func TestFindChartURL(t *testing.T) {
 	version := "0.1.0"
 	repoURL := "http://example.com/charts"
 
-	churl, username, password, insecureSkipTLSVerify, passcredentialsall, _, _, _, err := m.findChartURL(name, version, repoURL, repos)
+	churl, username, password, insecureSkipTLSVerify, err := m.findChartURL(name, version, repoURL, repos)
 	if err != nil {
 		t.Fatal(err)
 	}
@@ -95,9 +95,6 @@ func TestFindChartURL(t *testing.T) {
 	if password != "" {
 		t.Errorf("Unexpected password %q", password)
 	}
-	if passcredentialsall != false {
-		t.Errorf("Unexpected passcredentialsall %t", passcredentialsall)
-	}
 	if insecureSkipTLSVerify {
 		t.Errorf("Unexpected insecureSkipTLSVerify %t", insecureSkipTLSVerify)
 	}
@@ -106,7 +103,7 @@ func TestFindChartURL(t *testing.T) {
 	version = "1.2.3"
 	repoURL = "https://example-https-insecureskiptlsverify.com"
 
-	churl, username, password, insecureSkipTLSVerify, passcredentialsall, _, _, _, err = m.findChartURL(name, version, repoURL, repos)
+	churl, username, password, insecureSkipTLSVerify, err = m.findChartURL(name, version, repoURL, repos)
 	if err != nil {
 		t.Fatal(err)
 	}
@@ -123,9 +120,6 @@ func TestFindChartURL(t *testing.T) {
 	if password != "" {
 		t.Errorf("Unexpected password %q", password)
 	}
-	if passcredentialsall != false {
-		t.Errorf("Unexpected passcredentialsall %t", passcredentialsall)
-	}
 }
 
 func TestGetRepoNames(t *testing.T) {
diff --git a/pkg/getter/httpgetter_test.go b/pkg/getter/httpgetter_test.go
index d823aec0d..ad97898cb 100644
--- a/pkg/getter/httpgetter_test.go
+++ b/pkg/getter/httpgetter_test.go
@@ -54,7 +54,6 @@ func TestHTTPGetter(t *testing.T) {
 	// Test with options
 	g, err = NewHTTPGetter(
 		WithBasicAuth("I", "Am"),
-		WithPassCredentialsAll(false),
 		WithUserAgent("Groot"),
 		WithTLSClientConfig(pub, priv, ca),
 		WithInsecureSkipVerifyTLS(insecure),
@@ -77,10 +76,6 @@ func TestHTTPGetter(t *testing.T) {
 		t.Errorf("Expected NewHTTPGetter to contain %q as the password, got %q", "Am", hg.opts.password)
 	}
 
-	if hg.opts.passCredentialsAll != false {
-		t.Errorf("Expected NewHTTPGetter to contain %t as PassCredentialsAll, got %t", false, hg.opts.passCredentialsAll)
-	}
-
 	if hg.opts.userAgent != "Groot" {
 		t.Errorf("Expected NewHTTPGetter to contain %q as the user agent, got %q", "Groot", hg.opts.userAgent)
 	}
@@ -123,28 +118,6 @@ func TestHTTPGetter(t *testing.T) {
 	if hg.opts.insecureSkipVerifyTLS != insecure {
 		t.Errorf("Expected NewHTTPGetter to contain %t as InsecureSkipVerifyTLs flag, got %t", insecure, hg.opts.insecureSkipVerifyTLS)
 	}
-
-	// Checking false by default
-	if hg.opts.passCredentialsAll != false {
-		t.Errorf("Expected NewHTTPGetter to contain %t as PassCredentialsAll, got %t", false, hg.opts.passCredentialsAll)
-	}
-
-	// Test setting PassCredentialsAll
-	g, err = NewHTTPGetter(
-		WithBasicAuth("I", "Am"),
-		WithPassCredentialsAll(true),
-	)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	hg, ok = g.(*HTTPGetter)
-	if !ok {
-		t.Fatal("expected NewHTTPGetter to produce an *HTTPGetter")
-	}
-	if hg.opts.passCredentialsAll != true {
-		t.Errorf("Expected NewHTTPGetter to contain %t as PassCredentialsAll, got %t", true, hg.opts.passCredentialsAll)
-	}
 }
 
 func TestDownload(t *testing.T) {
@@ -190,7 +163,6 @@ func TestDownload(t *testing.T) {
 	httpgetter, err := NewHTTPGetter(
 		WithURL(u.String()),
 		WithBasicAuth("username", "password"),
-		WithPassCredentialsAll(false),
 		WithUserAgent(expectedUserAgent),
 	)
 	if err != nil {
@@ -204,76 +176,6 @@ func TestDownload(t *testing.T) {
 	if got.String() != expect {
 		t.Errorf("Expected %q, got %q", expect, got.String())
 	}
-
-	// test with Get URL differing from withURL
-	crossAuthSrv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		username, password, ok := r.BasicAuth()
-		if ok || username == "username" || password == "password" {
-			t.Errorf("Expected request to not include but got '%v', '%s', '%s'", ok, username, password)
-		}
-		fmt.Fprint(w, expect)
-	}))
-
-	defer crossAuthSrv.Close()
-
-	u, _ = url.ParseRequestURI(crossAuthSrv.URL)
-
-	// A different host is provided for the WithURL from the one used for Get
-	u2, _ := url.ParseRequestURI(crossAuthSrv.URL)
-	host := strings.Split(u2.Host, ":")
-	host[0] = host[0] + "a"
-	u2.Host = strings.Join(host, ":")
-	httpgetter, err = NewHTTPGetter(
-		WithURL(u2.String()),
-		WithBasicAuth("username", "password"),
-		WithPassCredentialsAll(false),
-	)
-	if err != nil {
-		t.Fatal(err)
-	}
-	got, err = httpgetter.Get(u.String())
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if got.String() != expect {
-		t.Errorf("Expected %q, got %q", expect, got.String())
-	}
-
-	// test with Get URL differing from withURL and should pass creds
-	crossAuthSrv = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		username, password, ok := r.BasicAuth()
-		if !ok || username != "username" || password != "password" {
-			t.Errorf("Expected request to use basic auth and for username == 'username' and password == 'password', got '%v', '%s', '%s'", ok, username, password)
-		}
-		fmt.Fprint(w, expect)
-	}))
-
-	defer crossAuthSrv.Close()
-
-	u, _ = url.ParseRequestURI(crossAuthSrv.URL)
-
-	// A different host is provided for the WithURL from the one used for Get
-	u2, _ = url.ParseRequestURI(crossAuthSrv.URL)
-	host = strings.Split(u2.Host, ":")
-	host[0] = host[0] + "a"
-	u2.Host = strings.Join(host, ":")
-	httpgetter, err = NewHTTPGetter(
-		WithURL(u2.String()),
-		WithBasicAuth("username", "password"),
-		WithPassCredentialsAll(true),
-	)
-	if err != nil {
-		t.Fatal(err)
-	}
-	got, err = httpgetter.Get(u.String())
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if got.String() != expect {
-		t.Errorf("Expected %q, got %q", expect, got.String())
-	}
 }
 
 func TestDownloadTLS(t *testing.T) {
diff --git a/pkg/repo/chartrepo_test.go b/pkg/repo/chartrepo_test.go
index 85401284e..7bd563460 100644
--- a/pkg/repo/chartrepo_test.go
+++ b/pkg/repo/chartrepo_test.go
@@ -292,14 +292,14 @@ func startLocalTLSServerForTests(handler http.Handler) (*httptest.Server, error)
 	return httptest.NewTLSServer(handler), nil
 }
 
-func TestFindChartInAuthAndTLSAndPassRepoURL(t *testing.T) {
+func TestFindChartInAuthAndTLSRepoURL(t *testing.T) {
 	srv, err := startLocalTLSServerForTests(nil)
 	if err != nil {
 		t.Fatal(err)
 	}
 	defer srv.Close()
 
-	chartURL, err := FindChartInAuthAndTLSAndPassRepoURL(srv.URL, "", "", "nginx", "", "", "", "", true, false, getter.All(&cli.EnvSettings{}))
+	chartURL, err := FindChartInAuthAndTLSRepoURL(srv.URL, "", "", "nginx", "", "", "", "", true, getter.All(&cli.EnvSettings{}))
 	if err != nil {
 		t.Fatalf("%v", err)
 	}
@@ -308,10 +308,10 @@ func TestFindChartInAuthAndTLSAndPassRepoURL(t *testing.T) {
 	}
 
 	// If the insecureSkipTLsverify is false, it will return an error that contains "x509: certificate signed by unknown authority".
-	_, err = FindChartInAuthAndTLSAndPassRepoURL(srv.URL, "", "", "nginx", "0.1.0", "", "", "", false, false, getter.All(&cli.EnvSettings{}))
+	_, err = FindChartInAuthAndTLSRepoURL(srv.URL, "", "", "nginx", "0.1.0", "", "", "", false, getter.All(&cli.EnvSettings{}))
 
 	if !strings.Contains(err.Error(), "x509: certificate signed by unknown authority") {
-		t.Errorf("Expected TLS error for function  FindChartInAuthAndTLSAndPassRepoURL not found, but got a different error (%v)", err)
+		t.Errorf("Expected TLS error for function  FindChartInAuthAndTLSRepoURL not found, but got a different error (%v)", err)
 	}
 }