Using build registry with GCP Artifact Registry

I can’t see a way to configure a docker registry in my build step for using Artifact Registry on GCP. Artifact Registry allows json key auth from service account, but the json attributes do not conform with the suggestion in the docs of username, password, and email. Even so, I’m not sure how I’d provide the key file to the build on a remote runner on Kubernetes.

I want to build on Kubernetes and deploy to Kubernetes. The deploy registry seems clear as I can provide the image_secret key name to auth there, but image_secret is not valid config for the build docker registry.

Anyone have suggestions or success with this?

Ok I think I have partially solved the auth issue.

By using the auth json described here

with username as _json_key_base64 and password as the base64 of the service account json key as described here

But now getting error

✓ Building Buildpack with kaniko...
❌ Testing registry and uploading entrypoint layer
! error setting up entrypoint layer to host:
  "https://australia-southeast1-docker.pkg.dev", err: Put
"/artifacts-uploads/namespaces/project-id/repositories/repo-name/uploads/AHi26s-a8LP3-Vg515kiVAim7BuuzinGNS1Fn6zBhOCdPLGIka128CrfPsQk1YmPBf6U9Orc6c7j-bOtpix4XCAfgLOY3XM0yhkfVGU06hsS_238RH
  unsupported protocol scheme ""