title: Error response from daemon while login to Docker
body: <p>I am trying to run Jenkins Pipeline script which will login to Docker and publish my container.</p>
  
  <blockquote>
    <p>Updated Pipeline</p>
  </blockquote>
  
  <pre><code>    node {
     echo 'Scm Checkout'
  
     stage('Scm Checkout'){
         git credentialsId: 'githib', url: 'https://github.com/subhendugn/spring-boot-docker.git', branch: 'master'
     }
  
     stage('Mvn Package'){
         def mvnHome = tool name: 'Maven3', type: 'maven'
         def mvnCMD =  "${mvnHome}/bin/mvn"
         sh label: '', script: "${mvnCMD} clean package"
     }
  
     stage('Build Docker Image'){
         sh 'docker build -t subhendugn/spring-boot-docker:latest .'
     }
  
     stage('Push Docker Image'){
      withCredentials([string(credentialsId: 'docker', variable: 'test_docker')]) {
              sh "docker login -u subhendugn -p ${test_docker} -e subhenduguhaneogi.93@gmail.com https://registry.hub.docker.com"
          }
         sh 'docker push subhendugn/spring-boot-docker:latest'
     }
  }
  </code></pre>
  
  <p>but I am getting following error.</p>
  
  <blockquote>
    <p>Updated</p>
  </blockquote>
  
  <pre><code>    + docker login -u subhendugn -p **** -e test@gmail.com https://registry.hub.docker.com
  WARNING: login credentials saved in /var/lib/jenkins/.dockercfg.
  Login Succeeded
  [Pipeline] }
  [Pipeline] // withCredentials
  [Pipeline] sh
  + docker push subhendugn/spring-boot-docker:latest
  The push refers to a repository [subhendugn/spring-boot-docker] (len: 1)
  3b9c3c5ae1a5: Buffering to Disk
  3b9c3c5ae1a5: Image push failed
  
  Please login prior to push:
  Username: EOF
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] }
  [Pipeline] // node
  [Pipeline] End of Pipeline
  ERROR: script returned exit code 1
  Finished: FAILURE
  </code></pre>
  
  <p>Can anyone please help me with this? I am looking for hands-on purpose.</p>
  
  <p>Thanks </p>