+7 votes
1 view
in Devops and Agile by (25k points)

I'm on Mac Snow Leopard and I just installed git.

I just tried

git clone [email protected]:cakebook.git

but that gives me this error:

Initialized empty Git repository in `/Users/username/Documents/cakebook/.git/`

Permission denied (publickey).

fatal: The remote end hung up unexpectedly

What am I missing?
I've also tried doing ssh-keygen with no passphase but still same error.

1 Answer

+8 votes
by (63.3k points)
selected by
 
Best answer

Command 1:

Ensure ssh-agent is enabled. The command starts the ssh-agent in the background:

eval "$(ssh-agent -s)"

Command 2:

Add your SSH key to the ssh-agent:

ssh-add ~/.ssh/id_rsa

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...