title: How to avoid password when using sudo in gitlab-ci.yml?
body: <p>I have a private docker repository where i store my build images.
  I did copy my registry certificates and updated my /etc/hosts file to authenticate registry from my local machine.</p>
  
  <p>I could login to registry with <code>'sudo docker login -u xxx -p xxx registry-name:port'</code></p>
  
  <p>But when i try same docker login command from gitlab-ci stage, it is failing with this error:<br></p>
  
  <blockquote>
    <p>sudo: no tty present and no askpass program specified.</p>
  </blockquote>
  
  <p>This is how i'm trying to achieve this.</p>
  
  <pre><code>ssh manohara@${DEPLOY_SERVER_IP} "sudo docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}"
  </code></pre>
  
  <p>I also tried adding this gitlab-runner <code>ALL=(ALL) NOPASSWD: ALL</code> at the bottom of /etc/sudoers file, but no luck
  Where am i going wrong?</p>