code: func (c *ChartDownloader) getRepoCredentials(r *repo.ChartRepository) (username, password string) {
  	username = c.Username
  	password = c.Password
  	if r != nil && r.Config != nil {
  		if username == "" {
  			username = r.Config.Username
  		}
  		if password == "" {
  			password = r.Config.Password
  		}
  	}
  	return
  }
docs: // getRepoCredentials if this ChartDownloader is not configured to use credentials, and the chart repository sent as an argument is,
  // then the repository's configured credentials are returned.
  // Else, this ChartDownloader's credentials are returned.