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

后端 未结 30 2388
野性不改
野性不改 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:17

    These are the steps I followed in windows 10

    1. Open Git Bash.

    2. Generate Public Key:

      ssh-keygen -t rsa -b 4096 -C "youremailaddress@xyz.com"
      
    3. Copy generated key to the clipboard (works like CTRL+C)

      clip < ~/.ssh/id_rsa.pub
      
    4. Browser, go to Github => Profile=> Settings => SSH and GPG keys => Add Key

    5. Provide the key name and paste clipboard (CTRL+V).

    6. Finally, test your connection (Git bash)

      ssh -T git@github.com
      

    Thanks!

提交回复
热议问题