title: Permission denied when cloning git repository
body: <p>So I just setup an Amazon EC2 instance. And installed git..</p>
  
  <pre><code>sudo yum install git
  </code></pre>
  
  <p>I then set up my ssh key with github. Now when I try to clone my repo into /var/www/html folder i get this error..</p>
  
  <pre><code>fatal: could not create work tree dir 'example.com'.: Permission denied
  </code></pre>
  
  <p>and when I run as root...</p>
  
  <pre><code>Cloning into 'example.com'...
  Permission denied (publickey).
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  </code></pre>
  
  <p>But I made sure that my github public key matches my ~/.ssh/id_rsa.pub key. Is there something that I'm missing here?</p>