Created
August 3, 2023 04:37
-
-
Save ErnestoRB/29e48b9dfdbaf29150e9798893454714 to your computer and use it in GitHub Desktop.
Change to OpenSSH on Windows git and add ssh-key to agent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement | |
# By default the ssh-agent service is disabled. Configure it to start automatically. | |
# Make sure you're running as an Administrator. | |
Get-Service ssh-agent | Set-Service -StartupType Automatic | |
# Start the service | |
Start-Service ssh-agent | |
# This should return a status of Running | |
Get-Service ssh-agent | |
# Now load your key files into ssh-agent | |
ssh-add $env:USERPROFILE\.ssh\id_ed25519 # change to your desired key | |
git config --global core.sshCommand "'C:\Windows\System32\OpenSSH\ssh.exe'" # or anywhere where your OpenSSH installation is |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment