# Error on checkout step

**URL:** <https://discuss.circleci.com/t/error-on-checkout-step/35558>\
**Category:** Bug Reports\
**Created:** [April 20, 2020, 3:30pm UTC](https://discuss.circleci.com/t/error-on-checkout-step/35558 "2020-04-20T15:30:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![felipe](https://avatars.discourse-cdn.com/v4/letter/f/90db22/32.png) [@felipe](https://discuss.circleci.com/u/felipe)\
**Post date:** [April 20, 2020, 3:30pm UTC](https://discuss.circleci.com/t/error-on-checkout-step/35558/1 "2020-04-20T15:30:46Z")

</div>

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 🙂  
Thanks!

---

<div class="post-metadata">

**Author:** ![gmemstr](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/gmemstr/32/22922_2.png) [@gmemstr](https://discuss.circleci.com/u/gmemstr)\
**Post date:** [April 21, 2020, 11:06am UTC](https://discuss.circleci.com/t/error-on-checkout-step/35558/2 "2020-04-21T11:06:48Z")

</div>

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](https://status.circleci.com/incidents/y96b8jc4m9bx). Pushing a fresh commit should allow the job to run normally 🙂

---

<div class="post-metadata">

**Author:** ![govizvamitra](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@govizvamitra](https://discuss.circleci.com/u/govizvamitra)\
**Post date:** [April 21, 2020, 1:56pm UTC](https://discuss.circleci.com/t/error-on-checkout-step/35558/3 "2020-04-21T13:56:49Z")

</div>

Same for me, builds are not working since friday

---

<div class="post-metadata">

**Author:** ![govizvamitra](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@govizvamitra](https://discuss.circleci.com/u/govizvamitra)\
**Post date:** [April 21, 2020, 2:05pm UTC](https://discuss.circleci.com/t/error-on-checkout-step/35558/4 "2020-04-21T14:05:13Z")

</div>

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:

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

```

---

<div class="post-metadata">

**Author:** ![felipe](https://avatars.discourse-cdn.com/v4/letter/f/90db22/32.png) [@felipe](https://discuss.circleci.com/u/felipe)\
**Post date:** [April 21, 2020, 5:15pm UTC](https://discuss.circleci.com/t/error-on-checkout-step/35558/5 "2020-04-21T17:15:22Z")

</div>

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)
```

---

<div class="post-metadata">

**Author:** ![pgarin](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/pgarin/32/24730_2.png) [@pgarin](https://discuss.circleci.com/u/pgarin)\
**Post date:** [April 23, 2020, 3:04pm UTC](https://discuss.circleci.com/t/error-on-checkout-step/35558/6 "2020-04-23T15:04:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![govizvamitra](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@govizvamitra](https://discuss.circleci.com/u/govizvamitra)\
**Post date:** [April 27, 2020, 9:36am UTC](https://discuss.circleci.com/t/error-on-checkout-step/35558/7 "2020-04-27T09:36:47Z")

</div>

Any updates? A week passed, builds still fail

---

<div class="post-metadata">

**Author:** ![felipe](https://avatars.discourse-cdn.com/v4/letter/f/90db22/32.png) [@felipe](https://discuss.circleci.com/u/felipe)\
**Post date:** [April 27, 2020, 2:42pm UTC](https://discuss.circleci.com/t/error-on-checkout-step/35558/8 "2020-04-27T14:42:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![govizvamitra](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@govizvamitra](https://discuss.circleci.com/u/govizvamitra)\
**Post date:** [April 27, 2020, 4:50pm UTC](https://discuss.circleci.com/t/error-on-checkout-step/35558/9 "2020-04-27T16:50:37Z")

</div>

Thanks! That helped
