I am using Neovim on windows, as well as the vim-fugitive plugin. The plugin has a command that pushes commits, Gpush. I get an error saying "permission denied (publickey) fatal: could not read from remote repository. I am using an ssh key, everything works fine in a console but not with the plugin. I can't find anyone else with the same issue online.
Asked
Active
Viewed 431 times
1 Answers
0
Try and launch Neovim from a CMD session where you have first typed:
set "GIT_SSH_COMMAND=ssh -Tv"
That should generate more traces during the Gpush command, allowing to see where SSH is looking from its private/public key pair.

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
Didn't work for me on ubuntu 20.04 – Ethan Fischer Nov 28 '21 at 01:21
-
@EthanFischer What version of Git do you have? – VonC Nov 28 '21 at 09:37
-
2.25.1 Also I think the issue in my case was that I had initially pulled my repo from github using http. After removing the http remote and replacing it with the ssh one, everything works as expected – Ethan Fischer Nov 28 '21 at 16:33
-
@Eth good call, well done. – VonC Nov 28 '21 at 18:42