title: Maven release git-push "Host key verification failed."
body: <p>When I am trying to have <em>jenkins</em> run a <code>mvn -B release:prepare</code> it gets to the point where it is to <code>push</code> changes to git, but fails with <code>Host key verification failed.</code> This is a local git repository.</p>
  
  <p>At this time, <em>jenkins</em> is run as <code>root</code>. SSH keys have been created for <code>root</code> and they have been added appropriately to the git user's <code>authorized_keys</code>. </p>
  
  <p>In fact, I can <em>ssh</em> to the build machine, <code>su</code> to <code>root</code> run
  <code>git clone git@localhost:my-project.git</code>
  clone successfully, create a branch and push that branch to <code>origin</code> successfully.</p>
  
  <p>Another strange thing is <em>jenkins</em> can clone the repository successfully before <code>mvn release:prepare</code> is run.</p>
  
  <p>When it tries to <code>push</code>, it gives the <code>Host key verification failed.</code> error.</p>
  
  <p>I have dumbed the build down to be 1 execution step</p>
  
  <pre><code>git clone git@localhost:my-project.git
  mvn -B release:prepare
  </code></pre>
  
  <p>Before responding, please don't suggest the git plugin or <em>maven release plugin</em>. These can't be installed.</p>