ezzshh gitbefore running your Git Commands
If when you run:
you are able to authenticate. But when you run any git operation you get the following error:
YOURGITORGADDRESS: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
This is cause because Windows Git can be setup on installation to use its own SSH-Agent instead of using the Windows one. To fix this problem you will have to change your git installation to use the windows SSH-Agent. To do this run:
git config --global core.sshCommand "'C:\Windows\System32\OpenSSH\ssh.exe'"
For changes to take effect, you might have to close your terminal, and in some cases a reboot is necessary.