0

While pushing to GitLab, I'm trying to reuse the same ssh key pair that I created on my Mac by copying them into ~/.ssh/ folder in my Windows 10 machine. On Mac they work, on Windows they don't. Is that an expected behavior and if so why, or am I missing some steps?

I also tried to add the key into ~/.ssh/config file, but that didn't seem to help either.

What would be an option in git to display more info on what kind of keys are used to establish a handshake during a git push and why they are not accepted?

Thanks.

Simeon Leyzerzon
  • 18,658
  • 9
  • 54
  • 82
  • Yes, keys work with the SSH protocol regardless of platform. What do you mean they "don't work" for you on Windows? – dimo414 Nov 12 '17 at 04:09
  • When attempting to do a ```git push origin master```, I'm getting a fatal error. If I generate another key and then add it to ~/.ssh/config on that machine, then it works. – Simeon Leyzerzon Nov 12 '17 at 04:30
  • Do you see any difference between the generated one and the original? E.g. different permissions, as rlee827 suggested. If you run `ssh -v git@github.com` you'll get debug information about exactly which keys ssh is trying to authenticate with. – dimo414 Nov 13 '17 at 01:52

1 Answers1

0

Windows10 OS need an ssh client for ssh operations. PuTTY is a popular one. You can download it from their website http://www.putty.org.

Cygwin or WSL also works and includes the ssh binary directly.

Quentin Gibson
  • 442
  • 1
  • 5
  • 15
  • PuTTY is just one option. Cygwin or WSL include the `ssh` binary directly, and there are other options too. – dimo414 Nov 12 '17 at 04:10
  • No, I'm not really looking for a client, I'm just trying to push the code in gitlab in the terminal. – Simeon Leyzerzon Nov 12 '17 at 04:33
  • You can use your password if you push using https instead of ssh. https://help.github.com/articles/which-remote-url-should-i-use/. Just point your remote to your url – Quentin Gibson Nov 12 '17 at 04:43
  • If you are having permission issues take a look at https://stackoverflow.com/questions/9270734/ssh-permissions-are-too-open-error – rlee827 Nov 12 '17 at 04:46