How to solve Permission denied (publickey) error when using Git?

后端 未结 30 2463
野性不改
野性不改 2020-11-22 08:07

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

I just tried

git clone git@thechaw.com:cakebook.git

but that gives

30条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 08:33

    I had a slight different situation, I was logged on to a remote server and was using git on the server, when I ran any git command I got the same message

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

    The way I fixed it was by changing the file /etc/ssh_config on my Mac. from

    ForwardAgent no 
    

    to

    ForwardAgent yes
    

提交回复
热议问题