title: Running git pull from a php script
body: <p>I was trying the <a href="http://net.tutsplus.com/tutorials/other/the-perfect-workflow-with-git-github-and-ssh/comment-page-1/#comment-365925" rel="noreferrer">Perfect Workflow, with Git, GitHub, and SSH</a>, and i have everything set up, except running the command <code>git pull</code> from php.</p>
  
  <p>When i run <code>exec('git pull')</code> i get: </p>
  
  <blockquote>
    <p>Could not create directory '/.ssh'. Host key verification failed.
    fatal: The remote end hung up unexpectedly</p>
  </blockquote>
  
  <p>If i run it in the terminal (as root) it works just fine, but i need this hook to work from the Post-Receive URL (Github).</p>
  
  <p>If i do <code>exec('whoami')</code> i get <code>apache</code>.</p>
  
  <p>It's a (dv) from mediatemple with CentOS.</p>