#Google Artifact Registry Authorization

1 messages · Page 1 of 1 (latest)

weak bronze
#

I know that this isn't a dagger issue but still was going to throw it out here incase there was an easy answer.

I followed https://docs.dagger.io/620941/github-google-cloud/ to deploy to Cloud run and it worked as expected. I want to use Artifact Registry instead of Container Registry though since the container registry is deprecated. When I switched to use Artifact Registry I get 403 errors.

panic: input:1: container.from.withDirectory.withWorkdir.withExec.withEntrypoint.publish failed to export: failed to push us-central1-docker.pkg.dev/myrepository: failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://us-central1-docker.pkg.dev/v2/token?scope=repository%myservice: 403 Forbidden

I created a new service account that has a role of Artifact Registry admin and I am still getting the same error. To run it locally I ran gcloud auth configure-docker us-central1-docker.pkg.dev and that let me run it locally successfully.

What do I need to do to be able to authenticate via my GitHub Action?

Watch a live demo of this tutorial in the Dagger Community Call (12 Jan 2023). For more demos, join the next Dagger Community Call.