From d29d6169eabce69e9ab15ae1676cd7fe5039e19d Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Thu, 10 Aug 2017 21:15:19 +0200 Subject: [PATCH] Fix using a registry anonymously if we have auth for another registry (#40) Signed-off-by: Patrick Uiterwijk --- utils/utils.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/utils.go b/utils/utils.go index 6e309272..794eaaab 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -48,7 +48,9 @@ func GetAuthConfig(c *cli.Context) (types.AuthConfig, error) { return creds, nil } } - return types.AuthConfig{}, fmt.Errorf("No authentication credentials exist for %s", c.GlobalString("registry")) + return types.AuthConfig{ + ServerAddress: c.GlobalString("registry"), + }, nil } // set the auth config as the registryURL, username and Password