mirror of
https://github.com/genuinetools/reg.git
synced 2024-06-30 11:04:16 -04:00
clair/vulns: use basic auth whe token is empty (#64)
- solves issue with Clair/AWS ECR combo
This commit is contained in:
parent
44f18c0104
commit
706e96ba44
|
@ -109,7 +109,7 @@ func (c *Clair) NewClairLayer(r *registry.Registry, image string, fsLayers []sch
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if useBasicAuth {
|
if token == "" || useBasicAuth {
|
||||||
h = map[string]string{
|
h = map[string]string{
|
||||||
"Authorization": fmt.Sprintf("Basic %s", base64.StdEncoding.EncodeToString([]byte(r.Username+":"+r.Password))),
|
"Authorization": fmt.Sprintf("Basic %s", base64.StdEncoding.EncodeToString([]byte(r.Username+":"+r.Password))),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue