Skip to content

Instantly share code, notes, and snippets.

@tsmoreland
Last active March 20, 2022 23:49
Show Gist options
  • Save tsmoreland/57be8fe026e491379f5093c729709607 to your computer and use it in GitHub Desktop.
Save tsmoreland/57be8fe026e491379f5093c729709607 to your computer and use it in GitHub Desktop.
Git/SSH Agent use

GIT/SSH Link

Run the following to set GIT_SSH required for git to use ssh-agent thus avoiding multiple prompts for password (which is less secure so take care)

[Environment]::SetEnvironmentVariable("GIT_SSH", "$((Get-Command ssh).Source)", [System.EnvironmentVariableTarget]::User)

SSH agent automatic startup

run the following to ensure automatic startup

Get-Service ssh-agent | Set-Service -StartupType Automatic

Visual Studio ssh config

use the following to set the correct ssh path for visual studio, it has issues with the copy running from C:\Windows\System32\OpenSSH

"\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin\git.exe" config --system core.sshcommand c:/Windows/SysNative/OpenSSH/ssh.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment