I can´t clone my github repository with a ssh key , the terminal said me -"[email protected]: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. I'm using WSL2 along windows 10.
I just want to able cloning repositories of my github account with a ssh key.
Check permissions on copied .ssh folder and (most of all) the private key inside that folder. You should
chmod 600the private key and alsochmod 700the .ssh folder. SSH requires you to protect your private keys.Usually when you copy a folder or file from windows to wsl2 (starting from wsl2) it assigns by default 777 permissions.