I have created a private git repo on github.
I ran the commands ssh-keygen -t ed25519 -C "me@gmail.com" -f ".\id_ed22519_me"
and ssh-add .\id_ed22519_me
to create the private and public keys, and added the public ssh key to github.
I also have setup the following config to use the correct keys:
#~/.ssh/config
Host github.com-me
HostName github.com
User git
IdentityFile ~/.ssh/id_ed22519_me
IdentitiesOnly yes
However when I try to use the git command I get the following error:
#powershell
PS C:\Path\to\Project> ssh -T git@github.com
Hi me! You've successfully authenticated, but GitHub does not provide shell access.
PS C:\Path\to\Project> git push --set-upstream origin master
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.
Can anyone know what could lead to that? I also have made sure that I use the correct url for the remote "origin", and that my branch is indeed "master"