0

In Windows WSL, I can clone from a remote repository with the generated shh keys, but It doesn't work in the powershell with the same ssh keys. Any idea?

The ssh keys were generated by

ssh-keygen
Super Hornet
  • 2,839
  • 5
  • 27
  • 55
  • Make sure you're running the same `ssh` binary. Windows comes with one, and Git-for-Windows comes with one, and depending on your path setting you might be using one in one setup and the other in the other. (They might even be compatible with each other but they store their key files in different directories.) – torek Apr 06 '22 at 21:45

1 Answers1

0

but It doesn't work in the powershell with the same ssh keys. Any idea?

Try first

$env:GIT_SSH_COMMAND='ssh -Tv'; git clone git@gitlab.com:myuser/myrepo.git

(as I recommended here)

You will see which SSH key is actually used.

And you might need to set GIT_SSH with $Env:GIT_SSH=$((Get-Command -Name ssh).Source), as commented here.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250