I’m trying to run git clone without ssh checking the repository host’s key. I can do it from ssh like that:
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no user@host
Is there any way to pass the same ssh options to the git clone command?
Edit: There is a restriction that I can’t modify ~/.ssh/config or any other files on that machine.
Add them to your
~/.ssh/config:The
Hostentry is what you’ll specify on the command line, and theHostNameis the true hostname. They can be the same, or theHostentry can be an alias. TheUserentry is used if you do not specifyuser@on the command line.If you must configure this on the command line, set the
GIT_SSHenvironment variable to point to a script with your options in it.