When I try to do a docker push to an Artifact Registry repository using GitHub Actions, I get this error:
Unauthenticated request. Unauthenticated requests do not have permission “artifact registry.repositories.upload Artifacts” on resource “projects/react-cloud-run-deploy-452614/locations/us/repositories/gcr.io” (or it may not exist)
It looks like the error that you are encountering may come from the GitHub Action Workflow, it may not be properly authenticated to push some images to Artifact Registry. There are ways that you might resolve it:
Ensure CorrectIAM Roles
Run these commands in Google Cloud SDK:
Try to re-run the workflows once the changes above have been made.
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.
Hello Google,
An hour before I send via mail one reply, please ignore this.
My Reply
I have implemented and tested your recommendations, but the error still occurs.
On the yaml File I add this:
And evaluates whether the principal currently has access to the specified resource: