GCloud gives warning : `docker-credential-gcloud` not in system PATH

Problem :

On an Ubuntu VM, the Docker pulls from Gcloud private repository give the error


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


After this to reconfigure auth, the following command is issued :


gcloud auth configure-docker


This gives the error:

WARNING: `docker-credential-gcloud` not in system PATH.
gcloud’s Docker credential helper can be configured but it will not work until this is corrected.
gcloud credential helpers already registered correctly.


Issue these commands on terminal


sudo su

curl -fsSL "https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v1.5.0/docker-credential-gcr_linux_amd64-1.5.0.tar.gz" | tar xz –to-stdout ./docker-credential-gcr > /usr/bin/docker-credential-gcr && chmod +x /usr/bin/docker-credential-gcr

docker-credential-gcr configure-docker

docker pull <your-image>


The docker pulls should work now.


Kj [/.] Sreekumar programs computers as a hobby and profession. Into programming from his school days, Sree uses Codemarvels to key in facts and fixes he finds interesting while working on different projects. Some of the articles here give away a few shades of his philosophical leanings too.

Leave a Comment

Your email address will not be published. Required fields are marked *