Error on checkout step

Hi, I’m having this issue in the checkout code step. It was working fine until a few days ago. Now it gets stucked there, asking for user input.

It’s weird to get this error on the checkout right? I saw the log of the checkout code step and it adds the ssh-rsa of github to the know_hosts.

Also the checkout SSH deploy key permission is set.

This is the log:

Using SSH Config Dir /.ssh
Cloning into '.'...
The authenticity of host 'github.com (140.82.113.4)' 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)? 

Any help is welcome :slight_smile:
Thanks!

Hi @felipe - can you confirm when this job was run, and if you are attempting to rerun it? There was a small interruption with checkout commands on Friday that affected a small number of checkouts - https://status.circleci.com/incidents/y96b8jc4m9bx. Pushing a fresh commit should allow the job to run normally :slight_smile:

Same for me, builds are not working since friday

I’ve pushed a lot of commits yesterday with different attempts to fix this. Strange thing is that when I’ve added a step with such a command before checkout:

mkdir ~/.ssh && touch ~/.ssh/known_hosts && ssh-keyscan github.com >> ~/.ssh/known_hosts

it’s output was:

# github.com SSH-2.0-babeld-76c80caa
# github.com SSH-2.0-babeld-76c80caa
no hostkey alg

Hi! Thank you for your reply @gmemstr

The problem started 4 days ago, but the error is still happening. I just created a new branch, a new commit and pushed it, but it failed with the same error.

I will copy all the log of the checkout step.

#!/bin/sh
set -e

# Workaround old docker images with incorrect $HOME
# check https://github.com/docker/docker/issues/2968 for details
if [ "${HOME}" = "/" ]
then
  export HOME=$(getent passwd $(id -un) | cut -d: -f6)
fi

echo Using SSH Config Dir $SSH_CONFIG_DIR

mkdir -p $SSH_CONFIG_DIR

echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
' >> $SSH_CONFIG_DIR/known_hosts

(umask 077; touch $SSH_CONFIG_DIR/id_rsa)
chmod 0600 $SSH_CONFIG_DIR/id_rsa
(cat <<EOF > $SSH_CONFIG_DIR/id_rsa
$CHECKOUT_KEY
EOF
)

export GIT_SSH_COMMAND='ssh -i $SSH_CONFIG_DIR/id_rsa -o UserKnownHostsFile=$SSH_CONFIG_DIR/known_hosts'

# use git+ssh instead of https
git config --global url."ssh://git@github.com".insteadOf "https://github.com" || true
git config --global gc.auto 0 || true

if [ -e /project/.git ]
then
  cd /project
  git remote set-url origin "$CIRCLE_REPOSITORY_URL" || true
else
  mkdir -p /project
  cd /project
  git clone "$CIRCLE_REPOSITORY_URL" .
fi

if [ -n "$CIRCLE_TAG" ]
then
  git fetch --force origin "refs/tags/${CIRCLE_TAG}"
else
  git fetch --force origin "PRYS-116:remotes/origin/PRYS-116"
fi


if [ -n "$CIRCLE_TAG" ]
then
  git reset --hard "$CIRCLE_SHA1"
  git checkout -q "$CIRCLE_TAG"
elif [ -n "$CIRCLE_BRANCH" ]
then
  git reset --hard "$CIRCLE_SHA1"
  git checkout -q -B "$CIRCLE_BRANCH"
fi

git reset --hard "$CIRCLE_SHA1"
Using SSH Config Dir /.ssh
Cloning into '.'...
The authenticity of host 'github.com (140.82.112.3)' 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)? 
Too long with no output (exceeded 10m0s)

I have the same issue. It’s not working for me also

Any updates? A week passed, builds still fail

I just ended changing my circleci config.yml to get the tests working again.

My workaround was changing the base images.

I changed:

  docker
    - image: ruby:2.1.1
    - image: circleci/mysql:5.6.38-ram

to this:

docker:
  - image: circleci/ruby:2.1
  - image: circleci/mysql:5.6.38-ram

I don’t really know why this change makes the script checkout not to fail. I supposed that is something related to the context of the base image.

Hope this helps you.

1 Like

Thanks! That helped