Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloning Git repository locally

Tags:

git

ssh

I have just create a git repository on my iMac under the user git account and am now want to clone it from my main user account on the same computer. I have created my SSH key and added it to the .ssh/authorized_keys file. However when I log back in with my main account I get the following error message:

Permission denied (publickey) fatal: The remote end hung up unexpectedly

Now to me, and while searching on the web it seems like my public key is incorrect. I have created it twice and still get the same issue.

like image 537
flowy Avatar asked Feb 09 '11 03:02

flowy


2 Answers

You shouldn't need an ssh key at all. Make all of the files world readable and just clone the full path. In other words, do

$ git clone /path/to/repo
like image 83
William Pursell Avatar answered Oct 01 '22 20:10

William Pursell


git clone /path/to_repository  /path/to_where_you_want_it_cloned

Make sure that your main user account has permissions to copy to/from your accounts directories.

like image 23
HBlend Avatar answered Oct 01 '22 20:10

HBlend