knative / build-templates

A library of build templates.
Apache License 2.0
184 stars 68 forks source link

kaniko template cannot push to gcr #85

Closed sebgoa closed 5 years ago

sebgoa commented 5 years ago

When you need to define GOOGLE_APPLICATION_CREDENTIALS properly.

the answer is in:

https://github.com/knative/build/issues/450#issuecomment-437116252

evankanderson commented 5 years ago

See also https://github.com/GoogleContainerTools/kaniko/issues/392

Based on the debugging in https://github.com/knative/build/issues/450#issuecomment-437116252, it looks like Kaniko no longer uses the docker credential helpers if configured when talking to GCR, and instead looks for other things in other places.

sebgoa commented 5 years ago

happy to close this here since there are other issues tracking it.

evankanderson commented 5 years ago

Two options are to revert to v0.1.0, or to see if Kaniko can be configured to use the default credential helpers. Putting the files in other locations just for GCR/Kaniko seems fragile.

But we should update the build-template to be working, I can send a PR to downgrade the v0.1.0 image for now.

sebgoa commented 5 years ago

I get the pin, but kaniko is already on v0.7.0 you might get other problems by reverting to v0.1.0