Skip to content

Instantly share code, notes, and snippets.

@JaimeStill
Last active October 10, 2023 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JaimeStill/aabfb5566b448311525d799fee019d01 to your computer and use it in GitHub Desktop.
Save JaimeStill/aabfb5566b448311525d799fee019d01 to your computer and use it in GitHub Desktop.

git SSH on Windows

ssh-keygen -t ed25519 -C "email@example.com"
# enter a file in which to save the key (/c/Users/YOU/.ssh/ed25519):[Press enter]
# enter passphrase(empty for no passphrase): [Type a passphrase]
# Enter same passphrase again: [Type passphrase again]

# from admin powershell
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Start-Service ssh-agent
ssh-add C:/Users/You/.ssh/id_ed25519

# Copy to clipboard
Get-Content C:\Users\YOU\.ssh\id_ed25519.pub -Raw | Set-Clipboard

Fix Constant Passphrase Prompting

# show current configuration
git config list

# add core.sshCommand config
git config --global core.sshCommand (Get-Command ssh).Source.Replace('\','/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment