title: jib-maven-plugin I/O error for image [registry-1.docker.io/library/adoptopenjdk]
body: <p>I have developed a Dockerized Spring Boot Application using as base image AdoptOpenJDK and using <code>jib-maven-plugin</code>.</p>
  <p>My plugin configuration is:</p>
  <pre><code>                &lt;plugin&gt;
                      &lt;groupId&gt;com.google.cloud.tools&lt;/groupId&gt;
                      &lt;artifactId&gt;jib-maven-plugin&lt;/artifactId&gt;
                      &lt;version&gt;${jib-maven-plugin.version}&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;from&gt;
                              &lt;image&gt;adoptopenjdk:11-jre-hotspot&lt;/image&gt;
                          &lt;/from&gt;
                          &lt;to&gt;
                              &lt;image&gt;public/my-app&lt;/image&gt;
                              &lt;tags&gt;
                                  &lt;tag&gt;latest&lt;/tag&gt;
                                  &lt;tag&gt;${project.version}&lt;/tag&gt;
                              &lt;/tags&gt;
                          &lt;/to&gt;
                          &lt;container&gt;
                              &lt;entrypoint&gt;
                                  &lt;shell&gt;bash&lt;/shell&gt;
                                  &lt;option&gt;-c&lt;/option&gt;
                                  &lt;arg&gt;/entrypoint.sh&lt;/arg&gt;
                              &lt;/entrypoint&gt;
                              &lt;ports&gt;
                                  &lt;port&gt;8080&lt;/port&gt;
                              &lt;/ports&gt;
                              &lt;environment&gt;
                                  &lt;SPRING_OUTPUT_ANSI_ENABLED&gt;ALWAYS&lt;/SPRING_OUTPUT_ANSI_ENABLED&gt;
                                  &lt;JHIPSTER_SLEEP&gt;0&lt;/JHIPSTER_SLEEP&gt;
                              &lt;/environment&gt;
                              &lt;creationTime&gt;USE_CURRENT_TIMESTAMP&lt;/creationTime&gt;
                          &lt;/container&gt;
                          &lt;extraDirectories&gt;
                              &lt;paths&gt;src/main/jib&lt;/paths&gt;
                              &lt;permissions&gt;
                                  &lt;permission&gt;
                                      &lt;file&gt;/entrypoint.sh&lt;/file&gt;
                                      &lt;mode&gt;755&lt;/mode&gt;
                                  &lt;/permission&gt;
                              &lt;/permissions&gt;
                          &lt;/extraDirectories&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
  </code></pre>
  <p>Everything is OK, and the app is builded correctly when launch <code>./mvnw package -Pprod -DskipTests jib:build -T16.0C</code>. Now I'm integrating my app in a CI/CD Jenkins Pipeline and I'm creating a command like the first but passing Auth data using variables:</p>
  <pre><code> ./mvnw -ntp -T2.0C jib:build -Djib.from.auth.username=myUserName -Djib.from.auth.password=mygitlabtoken01 -Dimage=registry.gitlab.com/myapp -X 
  </code></pre>
  <p>When I run it i get:</p>
  <pre><code>[INFO] Using credentials from Docker config (/Users/myUser/.docker/config.json) for registry.gitlab.com/neoris-emea-internal/ianthe/ianthe-app/ianthe
  [DEBUG] attempting bearer auth for registry.gitlab.com/app...
  [INFO] The base image requires auth. Trying again for adoptopenjdk:11-jre-hotspot...
  [INFO] Using credentials from &lt;from&gt;&lt;auth&gt; for adoptopenjdk:11-jre-hotspot
  [DEBUG] Trying basic auth for adoptopenjdk:11-jre-hotspot...
  [DEBUG] configured basic auth for registry-1.docker.io/library/adoptopenjdk
  [DEBUG] TIMED   Authenticating push to registry.gitlab.com : 1091.927 ms
  [DEBUG] TIMED   Building and pushing image : 1122.522 ms
  [ERROR] I/O error for image [registry-1.docker.io/library/adoptopenjdk]:
  [ERROR]     javax.net.ssl.SSLHandshakeException
  [ERROR]     Remote host terminated the handshake
  </code></pre>
  <p>I do not understand anything:</p>
  <ul>
  <li>Why jib plugin is using my <code>.docker/config.json</code> if I have indicated the auth info with <code>-Djib.from.auth.username=myUserName</code>?</li>
  <li>Why am I getting <code>SSLHandshakeException</code>? Although the build is using my credentials, these are correct.</li>
  </ul>