def without_host_key_checking_linux
      tmpdir = ::Dir.mktmpdir
      ssh_cmd = ::File.join(tmpdir, 'ssh')

      ::File.open(ssh_cmd, 'w') do |cmd|
        cmd.puts "#!/bin/bash"
        cmd.puts "exec ssh -o StrictHostKeyChecking=no ${@}"
      end
      ::FileUtils.chmod(0700, ssh_cmd)

      old_env = ::ENV['GIT_SSH']
      ::ENV['GIT_SSH'] = ssh_cmd
      yield
    ensure
      ::FileUtils.rm_rf(tmpdir)
      ::ENV['GIT_SSH'] = old_env
    end
def without_host_key_checking_linux
      tmpdir = ::Dir.mktmpdir
      ssh_cmd = ::File.join(tmpdir, 'ssh')

      ::File.open(ssh_cmd, 'w') do |cmd|
        cmd.puts "#!/bin/bash"
        cmd.puts "exec ssh -o StrictHostKeyChecking=no ${@}"
      end
      ::FileUtils.chmod(0700, ssh_cmd)

      old_env = ::ENV['GIT_SSH']
      ::ENV['GIT_SSH'] = ssh_cmd
      yield
    ensure
      ::FileUtils.rm_rf(tmpdir)
      ::ENV['GIT_SSH'] = old_env
    end
Temporarily disable SSH host-key checking for SSH clients invoked by Git, for the duration of the
 block that is passed to this method.

 @yield after disabling strict host key checking, yields to caller