I used this Blog as a base for this:
Open a powershell terminal as administrator and run the following to have ssh-agent
available.
# Have SSH agent start automatically
Get-Service ssh-agent | Set-Service -StartupType Automatic
# Start SSH agent now
Start-Service ssh-agent
# Should work successfully
Get-Service ssh-agent
# Tell git to use ssh.exe
git config --global core.sshCommand "'C:\Windows\System32\OpenSSH\ssh.exe'"
Copy your keys into a folder that ssh-agent
can access. Anywhere in the $HOME/.ssh
should be ok.
Then add the key to ssh-agent
. You will be prompted for a password and ssh-agent
will remember it for you.
# Add all the private keys you want, either `id_ed25519` or `rsa` types:
ssh-add "C:\Users\Juan Manuel Young H\.ssh\id_ed25519_key"
ssh-add "C:\Users\Juan Manuel Young H\.ssh\rsa_key"