I am trying to push a docker image to Google's container registry but keep getting a error about Docker login having failed. I run

gcloud docker -- push gcr.io/<my-project-id>/test-image

I get back

ERROR: Docker CLI operation failed:

Error response from daemon: login attempt to 
https://appengine.gcr.io/v2/ failed with status: 404 Not Found

ERROR: (gcloud.docker) Docker login failed.

Other gcloud operations that don't go through docker work. I can for example create a cluster via gcloud container clusters create my-cluster.

I did play around with a local registry today, not sure if that might have broken things.


4 Answers 4


You just need to disable storing docker credentials on macOS keychain on preferences of Docker for Mac.

  • 17
    And since it's worth a killoword: a screenshot of how to implement
    – hamx0r
    Jul 4, 2017 at 4:55
  • gcloud docker commands were working fine for me all last night. Then sometime today (7/18/17) I did a docker client update and the commands stopped working. Search let me here and this answer fixed the issue.
    – eggie5
    Jul 18, 2017 at 21:29
  • you saved my day! Why would anyone rollout such updates?.. Bizzare.
    – Ufos
    Jul 21, 2017 at 14:18

Edit: It seems my approach works only temporarily. Thanks to @hamx0r for posting a screenshot of how to apply the long-term fix.

Disable storing docker credentials on mac os x keychain by removing this entry from your ~/.docker/config.json file.

    "credsStore": "osxkeychain",

In my case, I had no additional configuration (I wasn't logged in), so I just blanked the entire file.

  • this worked to fix it for me as of July 11, 2017
    – Sam Gammon
    Jul 11, 2017 at 16:45
  • 2
    It seems my approach works only temporarily. Thanks to @hamx0r for posting a screenshot of how to apply the long-term fix. Jul 11, 2017 at 17:15

An update should be available in Google Cloud SDK v164.0.0 to fix this issue, sorry for the trouble.

Now would probably be a good time to advertise the newest, hottest authentication method in town: docker-credential-gcr

Edit: v164.0.0 has been released:

Breaking Changes

  • Removed appengine.gcr.io from the list of default repositories that gcloud docker authenticates for.

I had the same problem. I was using Docker for Mac from Edge channel (see difference https://docs.docker.com/docker-for-mac/install/). After switching to Stable (BEWARE, you lose all your images, containers, volumes, configs), I can push images to Google Container Registry again.

  • 15
    As of June 28th, the stable branch has this issue as well. This answer is no longer correct, alas.
    – Symmetric
    Jun 29, 2017 at 0:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .