fix invalid credentials error

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca
2016-04-21 14:32:34 +02:00
parent 28f2fedab9
commit c7be79e190

View File

@@ -505,7 +505,8 @@ func decodeDockerAuth(s string) (string, string, error) {
} }
parts := strings.SplitN(string(decoded), ":", 2) parts := strings.SplitN(string(decoded), ":", 2)
if len(parts) != 2 { if len(parts) != 2 {
return "", "", fmt.Errorf("invalid auth configuration file") // if it's invalid just skip, as docker does
return "", "", nil
} }
user := parts[0] user := parts[0]
password := strings.Trim(parts[1], "\x00") password := strings.Trim(parts[1], "\x00")