title: What are the alternative approaches to install Azure CLI on Ubuntu without root access?
body: <p>I am struggling to install Azure CLI on a Ubuntu machine without root access.</p>
  
  <p>The instructions <a href="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest" rel="nofollow noreferrer">here</a> assume that we have root access (or reasonable sudo access).</p>
  
  <p>I am trying to run this on a Ubuntu machine (provided by IBM DevOps toolchain - root access will never be granted) where executing the sudo command results in: </p>
  
  <pre><code>AZ_REPO=$(lsb_release -cs)
  echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | \
       sudo tee /etc/apt/sources.list.d/azure-cli.list
  </code></pre>
  
  <p>This results in <strong>sudo: no tty present and no askpass program specified</strong></p>
  
  <p><a href="https://unix.stackexchange.com/questions/122616/why-do-i-need-a-tty-to-run-sudo-if-i-can-sudo-without-a-password/122624#122624">Why do I need a tty to run sudo?</a> has some answers however I am not able to use them as I don't have control over the login to the shell via ssh. </p>
  
  <p>I am using the IBM Cloud's DevOps toolchain to deploy applications to both IBM Cloud and Azure.</p>
  
  <p>The DevOps toolchain provides me a shell for me to execute commands.</p>
  
  <p>Are there other alternatives</p>