title: docker push error "denied: requested access to the resource is denied"
body: <p>This error occurs when trying to push an image to the public repository on <strong>Docker Hub</strong>. There have been no issues with other registries I have tried. </p>
  
  <p><em>I have looked at numerous sites, blogs including StackOverflow and there is still no clear answer.</em></p>
  
  <p>You can try to replicate this issue as follows.</p>
  
  <p><a href="https://i.stack.imgur.com/Y1Adg.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Y1Adg.png" alt="Image on local host"></a></p>
  
  <p>As shown in the screenshot above, I have an image <code>aspc-mvc-app</code> on local docker host. As shown, it has 3 tags - <code>1.0.5</code>, <code>1.0.5.latest</code> and <code>latest</code>.</p>
  
  <p><strong>Assume that we are trying to push using an account name of <code>janedoe</code> at Docker Hub</strong></p>
  
  <p>Per documentation on <a href="https://docs.docker.com/docker-cloud/builds/push-images/" rel="noreferrer">Docker.io</a> and numerous other sites, there are 3 steps to pushing.</p>
  
  <p><em>(1) Login</em></p>
  
  <pre><code>docker login "index.docker.io" -u janedoe -p &lt;password&gt;
  </code></pre>
  
  <p>--> I get <code>Login Succeeded</code> which is good!</p>
  
  <p><em>(2) Add one or more tags</em></p>
  
  <p>Of the 3 tags, let's just tag the <code>latest</code>.</p>
  
  <pre><code>docker tag janedoe/aspc-mvc-app:latest janedoe/aspc-mvc-app
  </code></pre>
  
  <p>--> The prompt returns with no error. So far so good.</p>
  
  <p><em>(3) Push</em></p>
  
  <pre><code>docker push janedoe/aspc-mvc-app
  </code></pre>
  
  <p>--> This is where the error occurs.</p>
  
  <p>As shown on the screenshot below, initial checks seem to occur fine until you get the error <em>denied: requested access to the resource is denied</em></p>
  
  <p><a href="https://i.stack.imgur.com/lgv4r.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lgv4r.png" alt="enter image description here"></a></p>
  
  <p>At step (2), I have tried numerous other formats including the following.</p>
  
  <pre><code>docker tag janedoe/aspc-mvc-app:latest janedoe/aspc-mvc-app:latest
  docker tag janedoe/aspc-mvc-app janedoe/aspc-mvc-app:latest
  
  docker tag aspc-mvc-app:latest janedoe/aspc-mvc-app
  docker tag aspc-mvc-app janedoe/aspc-mvc-app:latest
  
  docker tag 306a8fd79d88 janedoe/aspc-mvc-app
  docker tag 306a8fd79d88 janedoe/aspc-mvc-app:latest
  </code></pre>
  
  <p>All fail with the same error.</p>
  
  <p>As a comparison, with the same exact image, I had no problem pushing to Azure Container Registry.</p>
  
  <p>Since Docker Hub is so popular, can anyone shed light on what the mystery is, or if there is a detailed documentation anywhere? </p>
  
  <p><strong>Updated 5/9/2017</strong></p>
  
  <p>I am fairly up-to-date on docker cli and server versions. Right now, my cli is <code>17.05.0-ce-rc1</code> and server is <code>17.04.0-ce</code> as shown below.</p>
  
  <p><a href="https://i.stack.imgur.com/YZmEa.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YZmEa.png" alt="enter image description here"></a></p>