in terminal I try to clone my git repository
git clone git@github.com:myuser/myrepository.git
The error message is:
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.
But I created a public key in github already. I tried once with id_ed1234.pub and also with id_rsa.pub.
(My local computer is a Mac and the server I like to clone to is a Linux)
The steps I made:
in Terminal I created an ssh key:
ssh-keygen -t ed25519 -C "myemail@example.com"
I copied the content of
/Users/myuser/.ssh/id_ed12345.pub.
In the administration panel of my linux provider (shared host) I created a new public ssh key and pasted the content of id_ed12345.pub
On github.com in settings I created an new ssh key and pasted the content of id_ed12345.pub
in terminal I connected via
ssh myuser@myhost
, navigated to my folder.I made
git init
and made
git clone git@github.com:myuser/myrepository.git