1

I'm trying to get my github repo cloned on my live site for the first time.

I pushed my public key out to my dreamhost server's home directory from my local terminal like so:

cat ~/.ssh/id_rsa.pub | ssh user@myserver.com 'cat >> .ssh/authorized_keys'

This didn't cause any errors and i can see my key on the remote server but when I try to clone a github repo after sshing into my remote server with:

git clone git@github.com:gituser/myrepo.git myserver.com/mysite

I get:

Cloning into mysite...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

I can push files from my local to github just fine (after a day of tweaking ;) ).

How do I clone from github to my remote server (live site)?

sigmapi13
  • 2,355
  • 3
  • 30
  • 27
  • This answer should help you out. [http://stackoverflow.com/a/88562/816157][1] [1]: http://stackoverflow.com/a/88562/816157 – Ken Jul 26 '12 at 15:15

1 Answers1

1

You'll need to push the public key of your remote server to github. If you haven't already generated the key, start at step one, https://help.github.com/articles/generating-ssh-keys. Otherwise, start from step 4 where it shows you how to add the key to your github account.

  • Figured it out. this is correct but I didn't know I needed a separate ssh key for the remote server as well as my local and that they both needed to be entered into github. So I ran the steps you have listed above on my remote by ssh'ing in and copied that id_rsa.pub contents into github. btw... pbcopy didn't seem to work for me for ssh, just did it manually. – sigmapi13 Jul 26 '12 at 19:22