Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

On Windows 10 that is well configured with native OpenSSH's ssh-agent, how to have an implementation of git use the ssh-agent configured?

I have configured Native Windows 10 OpenSSH like described here: https://www.makeuseof.com/tag/windows-10-ssh-vs-putty/

Also I have started as a service ssh-agent, added private key, and between restart my private key password's are remembered.

So mainly, I can do the following immediately after a restart without a prompt: ssh -T [email protected]

However, I don't know how to get any implementation of 'git' to delegate the ssh work to the Windows native ssh-agent, so that I can execute without any prompt a clone like: git clone [email protected]:SandboxAtHoopSoft/create-aws-accounts.git

like image 799
Sebastien Tardif Avatar asked Sep 11 '25 17:09

Sebastien Tardif


1 Answers

Solutions found are:

  • Set OS environment variable:

    set GIT_SSH=C:\WINDOWS\System32\OpenSSH\ssh.exe

OR

  • Set git config:

    git config --global core.sshCommand "'C:\Windows\System32\OpenSSH\ssh.exe'"

like image 87
Sebastien Tardif Avatar answered Sep 13 '25 06:09

Sebastien Tardif