Error
The authenticity of host 'github.com (140.82.113.4)' can't be established.
Fix
ssh-keyscan github.com >> ~/.ssh/known_hosts
Example (eg. using CircleCI workflow)
- run:
name: Add github.com to known hosts
command: ssh-keyscan github.com >> ~/.ssh/known_hosts
GitHub now exposes the ssh keys via API: https://api.github.com/meta , allowing the safer way of automating the process
https://serverfault.com/a/1098531/1058191