title: Unable to push docker image with fabric8 plugin
body: <p>I'm unable to push a docker image to a private repository (hosted on <a href="https://hub.docker.com" rel="nofollow noreferrer">https://hub.docker.com</a>) with fabric8 plugin. I created on hub.docker a repository called: <code>manuzid/heap-dump-sample</code>. It's a simple Spring Boot app only with a loop in the main function. the interesting part is the following in the pom.xml:</p>
  
  <pre><code>&lt;plugin&gt;
              &lt;groupId&gt;io.fabric8&lt;/groupId&gt;
              &lt;artifactId&gt;docker-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;0.27.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;registry&gt;index.docker.io/v1&lt;/registry&gt;
                  &lt;!-- I think it's not necessary, plugin use the creds from docker config.json --&gt;
                  &lt;authConfig&gt;
                      &lt;username&gt;user&lt;/username&gt;
                      &lt;password&gt;pw&lt;/password&gt;
                  &lt;/authConfig&gt;
                  &lt;images&gt;
                      &lt;image&gt;
                          &lt;name&gt;manuzid/heap-dump-sample:%l&lt;/name&gt;
                          &lt;alias&gt;${project.artifactId}&lt;/alias&gt;
                          &lt;build&gt;
                              &lt;from&gt;greyfoxit/alpine-openjdk8&lt;/from&gt;
                              &lt;entryPoint&gt;
                                  &lt;exec&gt;
                                      &lt;arg&gt;java&lt;/arg&gt;
                                      &lt;arg&gt;-jar&lt;/arg&gt;
                                      &lt;arg&gt;/opt/application/${project.artifactId}-${project.version}.jar&lt;/arg&gt;
                                      &lt;arg&gt;-XX:+HeapDumpOnOutOfMemoryError&lt;/arg&gt;
                                      &lt;arg&gt;-XX:HeapDumpPath=/dumps/oom.hprof&lt;/arg&gt;
                                  &lt;/exec&gt;
                              &lt;/entryPoint&gt;
                              &lt;tags&gt;
                                  &lt;tag&gt;${project.version}&lt;/tag&gt;
                              &lt;/tags&gt;
                              &lt;assembly&gt;
                                  &lt;targetDir&gt;/opt/application&lt;/targetDir&gt;
                                  &lt;descriptorRef&gt;artifact&lt;/descriptorRef&gt;
                              &lt;/assembly&gt;
                              &lt;env&gt;
                                  &lt;AB_ENABLED&gt;jmx_exporter&lt;/AB_ENABLED&gt;
                              &lt;/env&gt;
                          &lt;/build&gt;
                          &lt;run&gt;
                              &lt;wait&gt;
                                  &lt;log&gt;Started HeapDumpSampleApplication&lt;/log&gt;
                                  &lt;time&gt;10000&lt;/time&gt;
                              &lt;/wait&gt;
                              &lt;env&gt;
                                  &lt;JAVA_OPTIONS&gt;-Xmx64m&lt;/JAVA_OPTIONS&gt;
                              &lt;/env&gt;
                              &lt;log&gt;
                                  &lt;file&gt;${project.build.directory}/heap-dump-sample.log&lt;/file&gt;
                              &lt;/log&gt;
                          &lt;/run&gt;
                      &lt;/image&gt;
                  &lt;/images&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;docker-build&lt;/id&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;build&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;filter&gt;${project.artifactId}&lt;/filter&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;docker-push&lt;/id&gt;
                      &lt;phase&gt;install&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;push&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;filter&gt;${project.artifactId}&lt;/filter&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>I get the following error in the console: <code>[ERROR] DOCKER&gt; Unable to push 'manuzid/heap-dump-sample:latest' from registry 'index.docker.io/v1' : denied: requested access to the resource is denied  [denied: requested access to the resource is denied ]</code></p>
  
  <p>But the specified credentials are the same I use to log into the website (<a href="https://hub.docker.com" rel="nofollow noreferrer">https://hub.docker.com</a>). The specified registry url <code>index.docker.io/v1</code> is obtained with the command <code>docker info</code>. </p>
  
  <p>Any suggestions on this? Thanks in advance.</p>
  
  <p>Edit: This example can be found here: <a href="https://github.com/ManuZiD/heap-dump-sample" rel="nofollow noreferrer">https://github.com/ManuZiD/heap-dump-sample</a></p>