Local CLI | Host key verification failed. fatal: Could not read from remote repository


#1

Hi all,

I’m trying to run my CI job locally using the command: circleci local execute --job build

I’m encountering an issue where the repo is not being checked out successfully. Hoping someone could help.

Exit code: 128
Command: git
Arguments: ls-remote --tags --heads ssh://git@github.com/ecobee/edl-components.git
Directory: /home/circleci/consumer-website
Output:
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Exited with code 1
Step failed


#2

Is this a public or private repo?

Are you able to do a checkout on your local machine, using the SSH keys you have installed there?


#3

Hey @halfer this is a private repo and I am able to checkout the repo locally via SSH.


#4

I wonder if the circleci command is itself a (local) Docker container, in which case it cannot see your keys. Try adding an ls -la ~/.ssh step to see if there are any SSH keys available, from the command’s perspective.

(I’ve not used this command, so I may not be able to help much).