Broken SSH config file when using "add_ssh_keys"

Hello,

last couple days our deployment jobs are failing with following error:

/root/.ssh/config line 2: no argument after keyword "host"
/root/.ssh/config: terminating, 1 bad configuration options

After debugging we found out that add_ssh_keys add folowing lines to the .ssh/config file:

Host
  IdentitiesOnly no
  IdentityFile /root/.ssh/id_rsa_61214fd7fc8ad417d8d5d54b0d324bc4

Host is missing pattern argument.

Is this still failing for you?

I saw on https://status.circleci.com/ that there are issues with the macOS fleet. We don’t use macOS but have been seeing similar issues with:

  • ssh config
  • using git to checkout other repositories during a job

Specifically with the latter our errors claim we don’t have sufficient credentials to checkout said repo, when it was working for months beforehand.

My suspicion is that the issues they’ve announced in their status page aren’t limited to the macOS fleet.

We are not using macOS instances, so I’m afraid that’s not related.

we’re still experiencing failures, but did notice if we ssh onto the boxes and just change:

Host
...
     IdentityFile /root/.ssh/id_rsa_<hash>

to:

Host
...
     IdentityFile /root/.ssh/id_rsa

everything works as expected.

Still waiting on support for an official workaround, or acknowledgement there’s an issue with ssh atm, but might update our jobs to manually apply this workaround as part of our circle steps :person_shrugging: