question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Quarkus Error when pushing image to a GCP Artifact Registry within CloudBuild

See original GitHub issue

Hi,

In Cloud build, i try to push an image build with Jib on Artifact registry. I use embedded quarkus package to do it. But I still have A Permission Denied.

Step #0 - "packageApp": [ERROR] Caused by: com.google.cloud.tools.jib.api.RegistryAuthenticationFailedException: Failed to authenticate with registry [europe-west3-docker.pkg.dev/scc-build-docker/show-service/show-service](https://www.google.com/url?q=http://europe-west3-docker.pkg.dev/scc-build-docker/show-service/show-service&sa=D&source=buganizer&usg=AOvVaw32os90qmfSB1iwhbiIwQs4) because: 403 Forbidden
Step #0 - "packageApp": [ERROR] GET [https://europe-west3-docker.pkg.dev/v2/token?service=europe-west3-docker.pkg.dev&scope=repository:scc-build-docker/show-service/show-service:pull,push](https://www.google.com/url?q=https://europe-west3-docker.pkg.dev/v2/token?service%3Deurope-west3-docker.pkg.dev%26scope%3Drepository:scc-build-docker/show-service/show-service:pull,push&sa=D&source=buganizer&usg=AOvVaw0lJA_lLAIlj7PdZLC642S0)
Step #0 - "packageApp": [ERROR] {"errors":[{"code":"DENIED","message":"Permission \"artifactregistry.repositories.downloadArtifacts\" denied on resource \"projects/scc-build-docker/locations/europe-west3/repositories/show-service\" (or it may not exist)"}]}

My Cloudbuild.yaml look like

steps:            
- id: packageApp
  name: docker.io/anthonydenecheau/quarkus-maven-build-native-image:1.4
  entrypoint: bash
  args:
    - '-c'
    - |

      mvn clean package -Pnative -Dnative-image.docker-build=true \
      -Dmaven.test.skip=true -Dquarkus.profile=prod \
      -Dquarkus.native.additional-build-args=--initialize-at-run-time=jdk.internal.platform.cgroupv2.CgroupV2Subsystem

  env:
  - "SHORT_SHA=$SHORT_SHA"
  - "GCP_IMAGE_NAME=$_[REGION-docker.pkg.dev/$PROJECT_ID/$_SERVICE_NAME/$_SERVICE_NAME:$SHORT_SHA

Best regards

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
chanseokohcommented, Jun 29, 2022

@anthonydenecheau cool. I suggest removing -Djib.serialize=true unless necessary. It’ll slow down the build a lot.

0reactions
elefeintcommented, Jul 11, 2022

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deploying to Google Cloud Platform (GCP) - Quarkus
Deploying a Docker image to Google App Engine Flexible Custom Runtimes ... push it to a publicly accessible Docker registry, then use this...
Read more >
Push and pull images | Artifact Registry documentation
This page describes how to push and pull container images. For instructions on listing, tagging, and deleting images, see Managing images.
Read more >
Generate Quarkus native image with Jib - 403 Forbidden
Hi, In Cloud build, i try to push an image build with Jib on Artifact registry. I use embedded quarkus package to do...
Read more >
How to build quarkus native image on google cloudbuild
Push this image to the gcr, or any other registry that you can access from google cloud build. In the cloudbuild.yaml file the...
Read more >
Fixing Docker Image Tagging Issues in Google Cloud Build ...
I checked the Artifact Registry and noticed that the images were correctly built and pushed, but only tagged with latest .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found