DEV Community

Jorge Soares
Jorge Soares

Posted on

GCloud + Docker problema de unauthorized

unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication

Eu estava com problema para fazer deploy para o Google Container.
Por algum motivo meu Docker no Windows não estava conseguindo se conectar ao GCloud para fazer o push das imagens.

Depois de tentar de várias formas, a solução prática e rápida que encontrei foi usar esse comando.

gcloud docker -- pull gcr.io/image:tag
Enter fullscreen mode Exit fullscreen mode

Documentação: https://cloud.google.com/sdk/gcloud/reference/docker

Ao rodar esse comando, ele usa as credenciais do Gcloud para se autenticar com o docker e fazer tanto o Push quanto o Pull das imagens.

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay