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

后端 未结 30 1855
野性不改
野性不改 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条回答
  •  难免孤独
    2020-11-22 08:31

    Note that (at least for some projects) you must have a github account with an ssh key.

    Look at the keys listed in your authentication agent (ssh-add -l)
    (if you don't see any, add one of your existing keys with ssh-add /path/to/your/key (eg: ssh-add ~/.ssh/id_rsa))
    (if you don't have any keys, first create one. See: http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/internet/node31.html or just google ssh-keygen)

    To verify that you have a key associated with your github account:

    Go to: https://github.com/settings/ssh

    You should see at least one key with a hash key matching one of the hashes you saw when you typed ssh-add -l just a minute ago.

    If you don't, add one, then try again.

提交回复
热议问题