Merge pull request #569 from MartinEmrich/master

Accept AWS ECR token for any AWS account ECR, might resolve #441
pull/582/head
Karolis 2021-02-09 08:45:53 +00:00 committed by GitHub
commit abdc757628
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)