title: Cannot clone private repo from Vagrant provision file
body: <p>I have vagrant provision script containing shell commands. When I try to clone private repo via git and private\public keys within this script I get an error:</p>
  
  <pre><code>Cloning into 'brand.api'...
  
  Stderr from the command:
  
  stdin: is not a tty
  dpkg-preconfigure: unable to re-open stdin: No such file or directory
  Host key verification failed.
  fatal: The remote end hung up unexpectedly
  </code></pre>
  
  <p>But when I exclude <code>git clone ...</code> command from provision script and call it myself within vagrant box everything is ok. </p>
  
  <p>Here is the provision file:</p>
  
  <pre><code>#setting up Git
  apt-get install -y git
  mkdir ~/.ssh
  mkdir ~/bin
  cp /vagrant/bin/git-ssh.sh  ~/bin
  cp /vagrant/keys/mygit.key ~/.ssh/mygit.key 
  cp /vagrant/keys/mygit.pub ~/.ssh/mygit.pub
  
  chmod 600 ~/.ssh/*
  echo 'export GIT_SSH=~/bin/git-ssh.sh' &gt;&gt; ~/.bashrc
  source ~/.bashrc
  
  #installing brand-api
  git clone git@****.ru:brand.api.git
  </code></pre>
  
  <p>What's the problem?</p>
  
  <p><strong>UPDATED</strong></p>
  
  <p>After adding git repo host to known_hosts I get this:</p>
  
  <pre><code>Stderr from the command:
  
  stdin: is not a tty
  dpkg-preconfigure: unable to re-open stdin: No such file or directory
  Permission denied, please try again.
  Permission denied, please try again.
  Permission denied (publickey,password).
  fatal: The remote end hung up unexpectedly
  </code></pre>
  
  <p>But if I login to my box via <code>vagrant ssh</code> and try to clone everything is OK.</p>