У меня есть бродячий скрипт, содержащий команды оболочки. Когда я пытаюсь клонировать частное репо через git и закрытые \ открытые ключи в этом скрипте, я получаю сообщение об ошибке:
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
Но когда я исключаю команду git clone ...
из сценария предоставления и сам вызываю ее в бродячем поле, все в порядке.
Вот файл положения:
#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' >> ~/.bashrc
source ~/.bashrc
#installing brand-api
git clone git@****.ru:brand.api.git
В чем проблема?
ОБНОВЛЕНО
После добавления хоста git repo в known_hosts я получаю следующее:
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
Но если я войду в свой ящик через vagrant ssh
и попытаюсь клонировать, все в порядке.