To enable SSH Agent automatically on Windows, start PowerShell as an Administrator and run the following commands:
# Make sure you're running as an Administrator
Set-Service ssh-agent -StartupType Automatic
Start-Service ssh-agent
Get-Service ssh-agent
Run these commands in a terminal window within Visual Studio Code.
Show keys managed by the ssh-agent
ssh-add -l
Add a ssh key
ssh-add
For git, add a system environment variable or use a temporary setting in a PowerShell terminal of VSCode.
$env:GIT_SSH="C:\Windows\System32\OpenSSH\ssh.exe"