I managed to finda solution. Looks like in Windows in the Git installation folder there's an ssh_config file where you can specify the key to be used for authentications:
1. Open C:\Program Files\Git\etc\ssh\ssh_config (if that's where you installed Git)
2. Add lines
IdentityFile ~/.ssh/<your ssh key>
This worked for me, although I had to specify the absolute path for the key file (~ is not evaluating the home directory of the user in this case)
Of course, you shouldn't do this unless you're the only user on the system. I'd rather figure a better way to have Git provide information about what is going on with the SSH agent in this case (ie `git pull --verbose` tells me nothing about what is happening with the SSH session.
solved by adding the environment variable GIT_SSH as c:\Program Files\PuTTY\plink.exe (installed putty before)
as somebody mentioned here git have problem with openssh
OK, this actually works here, too. OpenSSH works fine on Windows (I'm on Win10) but for some reason the Git version of SSH was highjacking things, and wasn't reading my identity file.
By adding this ENV (per user!) I was able to get it to look at my user's SSH credentials without overriding the global config for the Git SSH executable.
For The access Denied Issues And git username , password
I had this problem too but managed to solve it, the error is that ur computer has saved a git username and password so if you shift to another account the error 403 will appear. Below is the solution
For Windows you can find the keys here:
control panel > user accounts > credential manager > Windows credentials > Generic credentials
Next remove the Github keys.