If the hyper config file is not set, the AuthConfig should be empty

This commit is contained in:
Ara Pulido
2017-12-28 12:38:28 +01:00
parent 2b68da36ea
commit 8ba9150da2

View File

@@ -333,8 +333,10 @@ func (p *HyperProvider) ensureImage(image string) error {
// Resolve the Repository name from fqn to RepositoryInfo
repoInfo, err := registry.ParseRepositoryInfo(distributionRef)
authConfig := p.resolveAuthConfig(p.configFile.AuthConfigs, repoInfo.Index)
var authConfig types.AuthConfig
if p.configFile != nil {
authConfig = p.resolveAuthConfig(p.configFile.AuthConfigs, repoInfo.Index)
}
encodedAuth, err := p.encodeAuthToBase64(authConfig)
if err != nil {
return err