Git for windows - “The authenticity of the host can’t be established” while running terraform init

Viewed 44

Getting this error message

So I am trying to run a terraform init from my local machine against code hosted in azure devops

I am getting this prompt and not sure how to proceed. I’ve tried y, yes, leaving it blank but it errors out and doesn’t download the modules

I recreated the ssh keys on my local machine and performed:

Ssh-key scan -H -t rsa.ssh.dev.azure.com > $env:userprofile/.ssh/known_hosts

Ssh-key scan -H -t vs-visualstudio.com > $env:userprofile/.ssh/known_hosts

Still getting the prompt and still getting a

Could not download module “**********” source code from git@vs-ssh.visualstudiocode.com/v3/<organization_name>/<project>/<repo>
…
Public key authentication failed
Fatal: could not read from remote repository
Please make sure you have the correct access rights and the repository exists

Tried in visual studio and Git bash terminal.

Any idea on what I am supposed to enter in that box and how to proceed?

1 Answers

Still getting the prompt and still getting a

Regarding the Public key authentication failed, check "Git SSH public key authentication failed with git on Azure DevOps"

You would still need to define a %USERPROFILE%\.ssh\config file in order to reference the right private key for git@ssh.dev.azure.com and git@vs-ssh.visualstudio.com

Try also (as noted in the documentation):

ssh-keyscan -t rsa ssh.dev.azure.com >> $env:userprofile/.ssh/known_hosts
ssh-keyscan -t rsa vs-ssh.visualstudio.com >> $env:userprofile/.ssh/known_hosts

That differs from the Ssh-key scan -H -t vs-visualstudio.com from your question.

Related