title: Generating SSH keys for 'apache' user
body: <p>How do I add SSH keys for 'apache' user in Linux? </p>
  
  <p><strong>BACKGROUND</strong> </p>
  
  <p>I am trying to add a service hook to github to notify a URL once I push to my repo. I have the following php page set up:</p>
  
  <pre><code>&lt;?php `git pull origin master`;  
  </code></pre>
  
  <p>However I get the following output:</p>
  
  <pre><code>sh: git: Permission denied
  </code></pre>
  
  <p>This is because the keys I generated for github access were generated by my 'root' user. However when I exectue a command from php it is the 'apache' user that runs it.</p>
  
  <p>The keys therefore do not correspond and permission is denied to pull.</p>
  
  <p>As I cannot switch user from the terminal to generate keys as 'apache', I am not too sure what to do. Can anyone suggest a solution?</p>