continuous-deployment-on-kubernetes icon indicating copy to clipboard operation
continuous-deployment-on-kubernetes copied to clipboard

403 on pushing image to GCR

Open fermelone opened this issue 4 years ago • 1 comments

Followed the guide here exactly, and I'm getting a 403 when Jenkins tries to upload the image to GCR using the command: gcloud builds submit -t ${IMAGE_TAG} .

Getting: `ERROR: (gcloud.builds.submit) HTTPError 403: Insufficient Permission``

However, I added a few gcloud commands before that, such as: gcloud container images list and it works, so I figured that it had to be the permissions on storage or buckets, but checked this in IAM and it seems to be ok, I can authenticate manually with the service account used, and I can upload things manually to GCR.

So my final thought is that the problem resides in the way Jenkins inherits gcloud accounts to execute stage commands.

Does anything sound familiar here? like a known issue? It's important to mention that the option Google service account from metadata does now work when adding new credentials in my Jenkins instance (also created with your guide). I had to upload a json key file to add credentials, and it seems to be working for all other commands, except the one I mentioned before, uploading images to GCR.

Thanks!

fermelone avatar Mar 15 '20 13:03 fermelone

did you solve it ? I got a similar error Failed to initialize HTTP transport: hudson.AbortException

Juanmanuelramirez avatar May 20 '21 18:05 Juanmanuelramirez