I have a section in a bash script I am writing to provision a vagrant box:
ssh-keyscan bitbucket.org >> ~/.ssh/known_hosts
ssh -T git@bitbucket.org
git clone git@bitbucket.org:my-username/api.git ~/html
sudo mv ~/html /usr/share/nginx
This section clones from a private bitbucket repo. It works fine, but if I remove ssh -T git@bitbucket.org
I get an an authentication error when attempting to clone.
What is the purpose of ssh -T
and why can't I authenticate without running this command?