====== Windows SSH Agent ====== ===== - SSH Agent Powershell ===== * https://alextrapixel.purpleinkenter.com/en/posts/2020/01/vscode_windows10_fix_git_ssh/ ==== - Git in powershell ==== Run PS as Admin Type command ssh-agent, if you face error message like unable to start ssh-agent service, error :1058 then you need to fix it. Run this Set-Service ssh-agent -StartupType Manual to fix the error. This command tell that to set service of ssh-agent and I set to start ssh-agent to manual because I want to use it when I need it. You can use Set-Service ssh-agent -StartupType Automatic if you wish so. After that ssh-add ~\.ssh\private.key ==== - prerequisites ==== * Using Git for windows with external open-ssh selected during setup. Windows ssh is stopped Get-Service ssh-agent Status Name DisplayName ------ ---- ----------- Stopped ssh-agent OpenSSH Authentication Agent Install post-git PowerShellGet\Install-Module posh-git -Scope CurrentUser -Force ==== - how to ==== You can get the ssh-agent running using the command that comes with Git for Windows in powershell: start-ssh-agent.cmd That will start up the ssh-agent. start-ssh-agent.cmd sets the variable SSH_AUTH_SOCK, which is required by ssh-add, but this variable cannot be accessed outside this CMD shell. Therefore, ssh-add needs to run inside this CMD shell. Then you can add your key with ssh-add ~/.ssh/namneOfPrivateKey