Git clone fails in Circle 2.0

I’m trying to migrate one of my builds to 2.0.

The build has a clone step of an external (and private) repository that contains some infra code for the build to execute.

Original circle.yml is working just fine:

    - git clone ~/RepoLocation

In the new config.yml, I tried to do the same:

- run:
name: Download HSConfiguration
command: git clone ~/RepoLocation

But for some reason I get a host unknown interactive command:

#!/bin/bash -eo pipefail
git clone ~/RepoLocation

Cloning into ‘/home/circleci/RepoLocation’…
The authenticity of host ‘ (’ can’t be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? Step was canceled

Anyone has any thoughts about it?


To work around that I added the following command:

  - run:
      name: Avoid hosts unknown for github
      command: mkdir ~/.ssh/ && echo -e "Host\n\tStrictHostKeyChecking no\n" > ~/.ssh/config

Just before the clone command itself.

1 Like

Hello @AvnerCohen,

This is happening when trying to clone a separate private repo from within the build?

Could you send me a build link? DM is also fine.

Also, have you added a user key to your project that has access to the repo?

This is 3 month old…

The issue is around “StrictHostKeyChecking no” , and yes, when I clone a
seperate repo from the one being built.

The first access to a certain github IP gives that warning.

I’m also seeing this issue in the same scenario

We also are seeing this. Only on first run I’m guessing.

We are even adding machine account key, but still getting the prompt to accept github’s RSA

#!/bin/bash -eo pipefail
bundle install --path vendor/bundle
Fetching gem metadata from
The authenticity of host ' (' can't be established.
RSA key fingerprint is SHA256:-----.
Are you sure you want to continue connecting (yes/no)? Too long with no output (exceeded 10m0s)

Those are two different things. Just running - checkout will add the key to ~/.ssh/known_hosts like you need. Or you can copy the necessary snippet from a given checkout command in the UI.

Running - checkout in a workflow triggered by a tag fails.
Do you have any advice within this context?

Are you restoring a source cache? Try removing that if you are.

I am running into the same issue. The workaround suggestion worked for me.

- run: 
          command: |
            mkdir ~/.ssh/ && echo -e "Host\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
            git clone -b develop $CIRCLE_REPOSITORY_URL 
1 Like

Hi guys,

We are having the same problem with only one new repository.

Whats the official response to this issue?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.