DEV Community 👩‍💻👨‍💻

Indra Wahyu
Indra Wahyu

Posted on • Updated on

Add SSH Key to Github

My Problem

┌─ 🍔 [/mnt/c/spotspace]
└─╼ git clone git@github.com:spotikum/image-property.git
Cloning into 'image-property'...
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com,20.205.243.166' (ECDSA) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Enter fullscreen mode Exit fullscreen mode

Error Image

My Solution

Generate new ssh key

ssh-keygen -t ed25519 -C "your_email@example.com"
Enter fullscreen mode Exit fullscreen mode

Add SSH key to GitHub
instruction

Get your public key on this directory

/home/"your_username"/.ssh/id_rsa.pub
Enter fullscreen mode Exit fullscreen mode

reference

Oldest comments (0)

Want to rep DEV and be comfy at the same time?

Check out our classic DEV shirt — available in multiple colors.