title: Pushing to private docker registry fails
body: <p>I am trying to run a private docker registry. I cloned the git repository and ran it.</p>
  
  <p>Then I pulled the base image from docker and tagged it as instructed on <a href="http://blog.docker.io/2013/07/how-to-use-your-own-registry/" rel="nofollow noreferrer">Sam Alba's guide</a>.</p>
  
  <pre><code>sudo docker pull base
  sudo docker tag b750fe79269d localhost:5000/base
  </code></pre>
  
  <p>I pushed the image to the local repository following are what I got from docker and the docker registry respectively.</p>
  
  <pre><code>sudo docker push localhost:5000/base
  
  The push refers to a repository [localhost:5000/base] (len: 1)
  Processing checksums
  Sending image list
  Pushing repository localhost:5000/base (1 tags)
  Pushing 27cf784147099545
  Buffering to disk 78093344/? (n/a)
  Pushing 78.09 MB/78.09 MB (100%)
  </code></pre>
  
  <p>The log from docker-registry when I push</p>
  
  <pre><code>"127.0.0.1 - - [12/Sep/2013:12:30:29] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http"
  2013-09-12 12:30:29,033 INFO: "127.0.0.1 - - [12/Sep/2013:12:30:29] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http"
  2013-09-12 12:30:29,042 DEBUG: check_session: Session is empty
  "127.0.0.1 - - [12/Sep/2013:12:30:29] "PUT http://localhost:5000/v1/repositories/base/ HTTP/1.1" 200 2 "-" "docker/0.5.3 go/go1.1 kernel/3.9.0-0-generic"
  2013-09-12 12:30:29,045 INFO: "127.0.0.1 - - [12/Sep/2013:12:30:29] "PUT http://localhost:5000/v1/repositories/base/ HTTP/1.1" 200 2 "-" "docker/0.5.3 go/go1.1 kernel/3.9.0-0-generic"
  2013-09-12 12:30:29,048 DEBUG: check_session: Session is empty
  2013-09-12 12:30:29,049 DEBUG: api_error: Image not found
  "127.0.0.1 - - [12/Sep/2013:12:30:29] "GET /v1/images/27cf784147099545/json HTTP/1.1" 404 34 "-" "Go 1.1 package http"
  2013-09-12 12:30:29,051 INFO: "127.0.0.1 - - [12/Sep/2013:12:30:29] "GET /v1/images/27cf784147099545/json HTTP/1.1" 404 34 "-" "Go 1.1 package http"
  2013-09-12 12:30:29,056 DEBUG: check_session: Session is empty
  "127.0.0.1 - - [12/Sep/2013:12:30:29] "PUT /v1/images/27cf784147099545/json HTTP/1.1" 200 4 "-" "docker/0.5.3 go/go1.1 kernel/3.9.0-0-generic"
  2013-09-12 12:30:29,059 INFO: "127.0.0.1 - - [12/Sep/2013:12:30:29] "PUT /v1/images/27cf784147099545/json HTTP/1.1" 200 4 "-" "docker/0.5.3 go/go1.1 kernel/3.9.0-0-generic"
  2013-09-12 12:32:00,811 DEBUG: check_session: Session is empty
  2013-09-12 12:32:01,764 DEBUG: put_image_layer: Error when computing tarsum invalid header
  2013-09-12 12:32:01,764 DEBUG: put_image_layer: Wrong checksum
  2013-09-12 12:32:01,764 DEBUG: api_error: Checksum mismatch, ignoring the layer
  "127.0.0.1 - - [12/Sep/2013:12:32:01] "PUT /v1/images/27cf784147099545/layer HTTP/1.1" 400 56 "-" "docker/0.5.3 go/go1.1 kernel/3.9.0-0-generic"
  2013-09-12 12:32:01,778 INFO: "127.0.0.1 - - [12/Sep/2013:12:32:01] "PUT /v1/images/27cf784147099545/layer HTTP/1.1" 400 56 "-" "docker/0.5.3 go/go1.1 kernel/3.9.0-0-generic"
  </code></pre>