title: Access google container registry without the gcloud client
body: <p>I have a CoreOS docker host that I want to start running containers on, but when trying to use the docker command to fetch the image from the google container private registry (<a href="https://cloud.google.com/tools/container-registry/">https://cloud.google.com/tools/container-registry/</a>), I get a 403. I did some searching, but I'm not sure how to attach authentication (or where to generate the user+pass bundle to use with the docker login command).</p>
  
  <p>Has anybody had any luck pulling from the google private containers? I can't install the gcloud command because coreos doesn't come with python, which is a requirement</p>
  
  <pre><code>docker run -p 80:80 gcr.io/prj_name/image_name
  Unable to find image 'gcr.io/prj_name/image_name:latest' locally
  Pulling repository gcr.io/prj_name/image_name
  FATA[0000] HTTP code: 403
  </code></pre>
  
  <p><strong>Update</strong>: after getting answers from @mattmoor and @Jesse: </p>
  
  <p>The machine that I'm pulling from does have devaccess</p>
  
  <pre><code>curl -H 'Metadata-Flavor: Google' http://metadata.google.internal./computeMetadata/v1/instance/service-accounts/default/scopes
  https://www.googleapis.com/auth/bigquery
  https://www.googleapis.com/auth/cloud-platform
  https://www.googleapis.com/auth/compute
  https://www.googleapis.com/auth/datastore
  ----&gt; https://www.googleapis.com/auth/devstorage.read_only
  https://www.googleapis.com/auth/logging.admin
  https://www.googleapis.com/auth/sqlservice.admin
  https://www.googleapis.com/auth/taskqueue
  https://www.googleapis.com/auth/userinfo.email
  </code></pre>
  
  <p>Additionally, I tried using the _token login method</p>
  
  <pre><code>jenkins@riskjenkins:/home/andre$ ACCESS_TOKEN=$(curl -H 'Metadata-Flavor: Google' 'http://metadata.google.internal./computeMetadata/v1/instance/service-accounts/default/token' | cut -d'"' -f 4)
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  100   142  100   142    0     0  14686      0 --:--:-- --:--:-- --:--:-- 15777
  jenkins@riskjenkins:/home/andre$ echo $ACCESS_TOKEN
  **************(redacted, but looks valid)
  jenkins@riskjenkins:/home/andre$ docker login -e not@val.id -u _token -p $ACCESS_TOKEN http://gcr.io
  Login Succeeded
  jenkins@riskjenkins:/home/andre$ docker run gcr.io/prj_name/image_name
  Unable to find image 'gcr.io/prj_name/image_name:latest' locally
  Pulling repository gcr.io/prj_name/image_name
  FATA[0000] HTTP code: 403
  </code></pre>