`docker-credential-gcloud` not in system PATH

后端 未结 10 1427
悲哀的现实
悲哀的现实 2020-12-14 14:38

After the latest updates to gcloud and docker I\'m unable to access images on my google container repository. Locally when I run: gcloud auth configure-docker

10条回答
  •  不知归路
    2020-12-14 15:09

    So I just faced the same problem where I am trying to pull an image from GCR to an GCP instance and want to share my solution.

    I ran gcloud auth configure-docker and got the warning:

    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.
    

    I applied the accepted answer for this thread and ran gcloud components install docker-credential-gcr and got a long error:

    ERROR: (gcloud.components.install) You cannot perform this action because this Cloud SDK installation is managed by an external package manager.
    Please consider using a separate installation of the Cloud SDK created through the default mechanism described at: https://cloud.google.com/sdk/
    

    When no solution was working, I uninstalled the Google provided google-cloud-sdk package that was installed via snap and instlled with distro specifice package manager, for me that is apt-get as instructed in the Installing Google Cloud SDK: Installation options page and re-ran the gcloud auth configure-docker and this time it solved my problem.

提交回复
热议问题