DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 970,177 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
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

Top comments (0)

🌚 Life is too short to browse without dark mode