Accept AWS ECR token for any AWS account ECR, might resolve #441

pull/569/head
Martin Emrich 2020-12-30 15:39:16 +01:00
parent aa4a9f7fd7
commit 017ebbac9d
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ func (h *CredentialsHelper) GetCredentials(image *types.TrackedImage) (*types.Cr
"token": *ad.AuthorizationToken,
"registry": registry,
}).Debug("checking registry")
if u.Host == registry {
if strings.SplitN(u.Host,".",2)[1] == strings.SplitN(registry,".",2)[1] {
username, password, err := decodeBase64Secret(*ad.AuthorizationToken)
if err != nil {
return nil, fmt.Errorf("failed to decode authentication token: %s, error: %s", *ad.AuthorizationToken, err)