i had a repository cloned and that worked very well. Unfortunatelly i had a problem with files inside so i decided to start from new. I deleted the repo on github and the folder on my computer.
After that i created the repo again and tried to clone it back to PC i get this error all the time.
git.exe clone --progress -v "git@github.com:USER/REPOSITORY.git" "E:\FOLDERNAME"
Cloning into 'E:\FOLDERNAME'...
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.
git did not exit cleanly (exit code 128) (672 ms @ 03.10.2021 01:07:48)
I tried so much to solve the issue:
Its strange but allthough i reinstalled tortoise git completely new, he still displayed the correct SSH-Key path but its greyed out so also if i would like to change that i cant.
Tried all solutions from: How to resolve "git did not exit cleanly (exit code 128)" error on TortoiseGit?
Found the solution. Because of some troubleshooting solutions i changed the SSH-Client at TortoiseGit > Settings > Network
from ssh.exe to the same that git uses. Because of that the field for the Private Key Path in TortoiseGit cloning window was greyed out.
I entered now the TortoiseGitPlink.exe
so the field was released, now i was able to set the new private key path.
Unfortunatelly now i got the error No supported authentication methods available (Sever sent: public key)
.
So i changed the SSH-Client back to ssh.exe
(without direct path) and now it worked fine!
I really dont know what exatly was wrong but it works now so im happy.