title: Sad story - git+ssh+ruby
body: <h1>Problem:</h1>
  
  <p>i need to verify git repo properties (ssh key,repo url) in ruby
  solutions:</p>
  
  <p>1) write ssh key into <code>~/.ssh/id_rsa</code> file and execute <code>git clone</code> command with repo url property - easiest way</p>
  
  <ul>
  <li>cause race conditions when multiple users trying to check theirs repos.</li>
  </ul>
  
  <p>2) write key into any file and link server and key in <code>ssh.config</code> file than execute git in ordinal way</p>
  
  <p>-<code>ssh.config</code> file has limited lenght(255 records)</p>
  
  <p>3) add key via <code>ssh-agent</code> and execute git in ordinal way </p>
  
  <ul>
  <li>ruby can't handle passphrase request (if ssh key protected with passphrase)</li>
  </ul>
  
  <h1>Resume:</h1>
  
  <p>so i need universal solution (like <code>ssh -i</code>) that is easy to use,clean,will work in multithread environment and all errors can be handled via basic IO (exec and so on)</p>