title: Git, vagrant (lucid 32), mountain lion, Permission denied
body: <p>I'm having a similar problem to this:
  <a href="https://stackoverflow.com/questions/7065257/permission-denied-publickey-fatal-the-remote-end-hung-up-unexpectedly-while">Permission denied (publickey). fatal: The remote end hung up unexpectedly while pushing back to git repository</a></p>
  
  <p>But I suspect it might be more complicated because I am running vagrant on a mac (mountain lion) and I am having this "Permission Denied" issue that I wasn't having in Snow Leopard.</p>
  
  <p>I set up git on my mac (mountain lion) with ssh key, it works.</p>
  
  <p>I set up vagrant (lucid32 box) and set up a new ssh key (once I ssh'ed into vagrant):</p>
  
  <pre><code>cd ~/.ssh
  ssh-keygen -t rsa -C "myemail@mail.com"
  Generating public/private rsa key pair.
  Enter file in which to save the key (/home/vagrant/.ssh/id_rsa): 
  Enter passphrase (empty for no passphrase): [just hit enter]
  Enter same passphrase again: [just hit enter]
  </code></pre>
  
  <p>Then I added the ssh key to my github repo (note: was having problems with pbcopy/xclip so I just used vi and copy-pasted)</p>
  
  <pre><code>vagrant@lucid32:~$ cd /vagrant/
  vagrant@lucid32:/vagrant$ git push -u origin master
  Permission denied (publickey).
  fatal: The remote end hung up unexpectedly
  </code></pre>
  
  <p>So, now I have two ssh keys in my github repo:</p>
  
  <pre><code>- My Mac key (works, can commit to my non-vagrant repo from my mac)
  - My vagrant key (does not work, cannot ssh into vagrant and commit my repo from my vagrant box)
  </code></pre>