Skip to content

Commit

Permalink
Fix credentials not set for ResolveChartVersion default HTTP client (h…
Browse files Browse the repository at this point in the history
…elm#4662)

Fixes Issue helm#4299 and Issue helm#4445

Signed-off-by: Caleb Delnay <calebdelnay@gmail.com>
  • Loading branch information
calebdelnay authored and Matthew Fisher committed Sep 18, 2018
1 parent 4dd9047 commit fbda50a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/downloader/chart_downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,11 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, ge
if err != nil {
return u, nil, err
}
getter, err := getterConstructor(ref, "", "", "")
return u, getter, err
g, err := getterConstructor(ref, "", "", "")
if t, ok := g.(*getter.HttpGetter); ok {
t.SetCredentials(c.Username, c.Password)
}
return u, g, err
}
return u, nil, err
}
Expand Down

0 comments on commit fbda50a

Please sign in to comment.