views:

43

answers:

1

I feel like I tried everything to clone http://thechaw.com/source from git with no success. I have a create SSH keys in order to access this git and I believe I followed the directions but I'm missing something easy.

I followed all the instructions (http://thechaw.com/wiki/guides/setup). Can someone tell me what I'm going wrong?

  1. First:

    % cd ~/.ssh && sh-keygen

  2. Added my key to their "account" section (I assume the key leaves off the "ssh-ras" and the "me@mydomain"`
  3. Then:

    % git config --global user.name "<My git Username>"

    % git config --global user.email <My git Email address>

  4. Now I try to clone using

    % sudo git clone [email protected]:chaw.git

I always receive:

Initialized empty Git repository in /var/www/chaw/chaw/.git/
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

I've been trying for many hours. What am I missing? I have a github account and I even put my ssh key in there (but I believe that shouldn't have any effect).

Any help would be appreciated. Thanks!

+1  A: 

I believe you added the ssh key and Git configuration to your non-root user, but then used "sudo" to do the clone thereby making Git not find your user's keys (since it's running as root).

mfontani
You are the man!!!
frio80