Skip to content

bootBuildImage fails to authenticate with GCP Artifact Registry using Docker credential helper #45849

Closed as not planned
@lnhrdt

Description

@lnhrdt

I'm trying to transition some of our container image builds from using the pack CLI to using Spring Boot's bootBuildImage Gradle task.

Previously, our CI pipeline (GitHub Actions) authenticated to Google Artifact Registry using:

gcloud auth configure-docker <REGISTRY>

This sets a Docker config like:

{
  "auths": {
    "https://index.docker.io/v1/": {
      "auth": "<redacted>"
    }
  },
  "credHelpers": {
    "<REGISTRY>": "gcloud"
  }
}

Which works perfectly with pack build --publish, which successfully pushes to Artifact Registry.

However, when switching to Spring Boot's bootPublishImage, the push fails with:

Error response received when pushing image: denied: Unauthenticated request. Unauthenticated requests do not have permission "artifactregistry.repositories.uploadArtifacts" on resource "REDACTED" (or it may not exist)

From what I understand, the plugin is supposed to support Docker credential helpers (as mentioned in the docs), but it seems like it may not actually invoke the helper (docker-credential-gcloud) during the push.

Is gcloud explicitly supported as a credential helper in this context? The documentation wasn't specific about which helpers are supported, and I wasn't able to get this working without switching to static credentials. Would appreciate any clarification or guidance here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions