Skip to content

Commit 19467a5

Browse files
calebdelnayMatthew Fisher
authored and
Matthew Fisher
committed
Fix credentials not set for ResolveChartVersion default HTTP client (helm#4662)
Fixes Issue helm#4299 and Issue helm#4445 Signed-off-by: Caleb Delnay <calebdelnay@gmail.com> (cherry picked from commit fbda50a)
1 parent 3946629 commit 19467a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/downloader/chart_downloader.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,11 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, ge
170170
if err != nil {
171171
return u, nil, err
172172
}
173-
getter, err := getterConstructor(ref, "", "", "")
174-
return u, getter, err
173+
g, err := getterConstructor(ref, "", "", "")
174+
if t, ok := g.(*getter.HttpGetter); ok {
175+
t.SetCredentials(c.Username, c.Password)
176+
}
177+
return u, g, err
175178
}
176179
return u, nil, err
177180
}

0 commit comments

Comments
 (0)