From 706e96ba44c6d256bf30bae2d6c5f2695edfeea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Pra=C5=BCak?= Date: Sun, 18 Feb 2018 17:16:24 +0100 Subject: [PATCH] clair/vulns: use basic auth whe token is empty (#64) - solves issue with Clair/AWS ECR combo --- clair/vulns.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clair/vulns.go b/clair/vulns.go index e42d437c..b8af5b41 100644 --- a/clair/vulns.go +++ b/clair/vulns.go @@ -109,7 +109,7 @@ func (c *Clair) NewClairLayer(r *registry.Registry, image string, fsLayers []sch } } - if useBasicAuth { + if token == "" || useBasicAuth { h = map[string]string{ "Authorization": fmt.Sprintf("Basic %s", base64.StdEncoding.EncodeToString([]byte(r.Username+":"+r.Password))), }