Readers will need more information and detail to help you. Are you running godep in the CircleCI build container? Can it see the SSH key it needs as if you were performing this action on your local dev machine?
Yes i am running go dep ensure in CircleCi build
.ssh directory is empty (atleast when I was trying to SSH there it was empty)
I was not precise enough - I didnt setup any SSH Permissions keys but I’ve add Checkout keys which is using my user key
I’ve created new ssh key, add to circleCi private, add public in github.
And still it stuck on CircleCI
It seems to be problem with known_hosts
after invoking clone GIT_SSH_COMMAND=“ssh -o StrictHostKeyChecking=no” git clone --depth=1 git@github.com:XXX/YYY.git
before dep ensure it works.
How can I add github to known hosts on circleCi?
Don’t do this - it enables a class of security risks that you should not open yourself up to.
What I do is to use the Build with SSH option in the failed Job UI, get an SSH session, and do the clone manually with interactive prompts. Once this is done, you will have a known_hosts file created.
You can then cat that to the console, and copy+paste it into a local file, which can be committed to a private repo. From there you can copy it in place before doing the checkout.