Because of this password prompt, auto-fetch, push and pull from VSCode doesn't work. This requires me to manually push/pull from the integrated terminal (which will prompt me a password).
However, when I run ssh -T git@github.com-work
within the Integrated Terminal of VSCode, I am able to ssh in without a password prompt (which is what I am trying to achieve). I have already added the ssh keys via ssh-add
and I see them using ssh-add -L
.
Similarly, I am able to run ssh -T git@github.com-work
in Windows Terminal without being prompted for the password.
What I wish to achieve is being able to push and pull my repositories using VSCode's inbuilt tools without the password prompt every time I attempt to fetch, pull or push. This password prompt is preventing VSCode from auto-fetching or updating my repository by clicking the sync icon on the bottom right (results in a Permission denied(publickey, keyboard-interactive) prompt from VSCode)
Edit:
Thanks to VonC, I don't have to type my password everytime I run git fetch
etc. within VSCode's integrated terminal. This was solved by adding
$env:GIT_SSH="C:\Windows\System32\OpenSSH\ssh.exe"
to my Powershell profile.
However, it still didn't resolve the main issue that VSCode's internal source control tools are unable to pull from git@github.com-work
but keeps trying at git@github.com
.