Non interactive git clone (ssh fingerprint prompt)

Posted by qwe on Server Fault See other posts from Server Fault or by qwe
Published on 2012-11-09T09:04:56Z Indexed on 2012/11/09 11:06 UTC
Read the original article Hit count: 203

Filed under:
|

I want to clone a repo in a non-interactive way. When cloning, git asks to confirm host's fingerprint:

The authenticity of host 'bitbucket.org (207.223.240.182)' can't be established.
RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40.
Are you sure you want to continue connecting (yes/no)? no

How do I force "yes" every time this questions pops up? I tried using yes yes | git clone ..., but it doesn't work.

EDIT: Here's a solution: Can I automatically add a new host to known_hosts? (adds entires to known_hosts with ssh-keyscan).

© Server Fault or respective owner

Related posts about ssh

Related posts about git