The goal is to clone a Git repository in Visual Studio Team Services without providing any passwords. The further goal is to do it completely non-interactively, without any prompts at all.
Problem description:
Operating system is Windows Server 2016. Let's say my user name is batman.
I have set up the private key (without passphrase) in Windows at C:\Users\batman\.ssh\id_rsa
.
I have added the public key for my user account at VSTS. All good.
I want to clone the repository and VSTS web UI provides me an SSH URL to the repository. I use it in the following command that I execute:
git clone ssh://mycompany@mycompany.visualstudio.com:22/MyProject/_git/MyRepo
The response:
Cloning into 'MyRepo'...
Enter passphrase for key '/c/Users/batman/.ssh/id_rsa':
mycompany@mycompany.visualstudio.com's password:
So first it asks for the key passphrase where I just press Enter but the last line is confusing. What password should I input and why is it asking it? How to make it not ask it? How to make the clone command not ask anything at all?