title: "tag latest not found" on docker pull with private registry
body: <p>I'm having troubles pulling images pushed to a private registry and get:</p>
  
  <p><strong>Tag latest not found in repository</strong></p>
  
  <p>I'm using the default registry container provided by Docker:</p>
  
  <pre><code># docker images
  REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
  registry            latest              7e2db37c6564        8 days ago          411.6 MB
  janos/wheezy        latest              900e813f1fd9        11 months ago       218.6 MB
  </code></pre>
  
  <p>As a test, let's say I want to have a local version of wheezy:</p>
  
  <pre><code># docker tag janos/wheezy staging-docker.mysite.nl/myself/wheezy
  # docker push staging-docker.mysite.nl/myself/wheezy
  The push refers to a repository [staging-docker.mysite.nl/myself/wheezy] (len: 1)
  Sending image list
  Pushing repository staging-docker.mysite.nl/myself/wheezy (1 tags)
  7af801e4faa1: Pushing [==================================================&gt;] 226.3 MB/226.3 MB
  2014/11/21 16:06:38
  </code></pre>
  
  <p>The image seems to be there:</p>
  
  <pre><code># docker images
  REPOSITORY                             TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
  registry                               latest              7e2db37c6564        8 days ago          411.6 MB
  staging-docker.mysite.nl/myself/wheezy   latest              900e813f1fd9        11 months ago       218.6 MB
  janos/wheezy                           latest              900e813f1fd9        11 months ago       218.6 MB
  </code></pre>
  
  <p>And locally I can start it:</p>
  
  <pre><code># docker run -i -t staging-docker.mysite.nl/myself/wheezy /bin/bash
  root@6b5fafe61d88:/# ls
  bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  selinux  srv  sys  tmp  usr  var
  root@6b5fafe61d88:/# exit
  </code></pre>
  
  <p>But when trying to run or pull it from another server, I get "Tag latest not found"</p>
  
  <pre><code># docker pull staging-docker.mysite.nl/myself/wheezy
  Pulling repository staging-docker.mysite.nl/myself/wheezy
  2014/11/21 16:08:15 Tag latest not found in repository staging-docker.mysite.nl/myself/wheezy
  </code></pre>
  
  <p>Explicitly adding "latest" does not help. Same error.</p>
  
  <p>I can see the calls arrive at the registry, so I'm not inadvertedly using another:</p>
  
  <pre><code>172.17.42.1 - - [21/Nov/2014:15:08:15 +0000] "GET /v1/_ping HTTP/1.0" 200 1439 "-" "Go 1.1 package http"
  172.17.42.1 - - [21/Nov/2014:15:08:15 +0000] "GET /v1/_ping HTTP/1.0" 200 1439 "-" "Go 1.1 package http"
  21/Nov/2014:15:08:15 +0000 DEBUG: args = {'namespace': u'myself', 'repository': u'wheezy'}
  172.17.42.1 - - [21/Nov/2014:15:08:15 +0000] "GET /v1/repositories/myself/wheezy/images HTTP/1.0" 200 164 "-" "docker/1.3.1 go/go1.3.3 git-commit/4e9bbfa kernel/3.16.0-0.bpo.2-amd64 os/linux arch/amd64"
  21/Nov/2014:15:08:15 +0000 DEBUG: args = {'namespace': u'myself', 'repository': u'wheezy'}
  21/Nov/2014:15:08:15 +0000 DEBUG: [get_tags] namespace=myself; repository=wheezy
  172.17.42.1 - - [21/Nov/2014:15:08:15 +0000] "GET /v1/repositories/myself/wheezy/tags HTTP/1.0" 200 2 "-" "docker/1.3.1 go/go1.3.3 git-commit/4e9bbfa kernel/3.16.0-0.bpo.2-amd64 os/linux arch/amd64"
  </code></pre>
  
  <p>And when checking the tags of the image manually, they are indeed empty:</p>
  
  <pre><code># curl -k https://staging-docker.mysite.nl/v1/repositories/myself/wheezy/tags
  {}
  </code></pre>
  
  <p><strong>Question 1</strong>: how come it is empty in the first place, since Docker always uses latest...</p>
  
  <p><strong>Question 2</strong>: if somehow things got messed up and the latest tag is indeed gone, how come I can still start it up locally?</p>
  
  <p>Docker versions are the same on both servers:</p>
  
  <pre><code># docker version 
  Client version: 1.3.1
  Client API version: 1.15
  Go version (client): go1.3.3
  Git commit (client): 4e9bbfa
  OS/Arch (client): linux/amd64
  Server version: 1.3.1
  Server API version: 1.15
  Go version (server): go1.3.3
  Git commit (server): 4e9bbfa
  </code></pre>