diff --git a/api/pkg/imagebuilder/imagebuilder.go b/api/pkg/imagebuilder/imagebuilder.go index 2fea4e767..3e0afade4 100644 --- a/api/pkg/imagebuilder/imagebuilder.go +++ b/api/pkg/imagebuilder/imagebuilder.go @@ -365,7 +365,8 @@ func (c *imageBuilder) imageExists(imageName, imageTag string) bool { // https://github.com/google/go-containerregistry/blob/master/cmd/crane/README.md // https://github.com/google/go-containerregistry/blob/master/pkg/v1/google/README.md func (c *imageBuilder) imageRefExists(imageName, imageTag string) (bool, error) { - keychain := authn.DefaultKeychain + var keychain authn.Keychain + keychain = authn.DefaultKeychain if strings.Contains(c.config.DockerRegistry, "gcr.io") { keychain = google.Keychain }