SSH to GIT not working

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
DanOvergaard
Posts: 4
Joined: Thu Jan 07, 2021 10:44 am

SSH to GIT not working

Post by DanOvergaard » Thu Apr 08, 2021 12:59 pm

Hi,

I have tried to setup a connection to GITLAB by using the GIT Client and SSH, but it's not working - Oxygen Editor keeps asking for a SSH Passphrase

I have it all to run via TortoiseGit, so the configuration on GIT is working

PLease help

sorin_carbunaru
Posts: 363
Joined: Mon May 09, 2016 9:37 am

Re: SSH to GIT not working

Post by sorin_carbunaru » Thu Apr 08, 2021 2:36 pm

Hello,

If you are using Pageant or ssh-agent, it seems that the Apache MINA SSHD library that we use in our Git Client does not support them:
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=541275
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=541274

You could try switching to JSch by adding "-DuseJschForSSHOperations=true" to the "oxygen[VERSION_HERE].vmoptions" file in the Oxygen installation folder, but keep in mind that JSch does not seem to be maintained anymore.

You could also try using SSH keys as described here:
1. https://docs.gitlab.com/ee/ssh/#generat ... h-key-pair
2. https://docs.gitlab.com/ee/ssh/#add-an- ... ab-account

This second approach from the GitLab docs is the one that I have successfully used over and over again.

All the best wishes,
Sorin Carbunaru
Oxygen XML Editor

DanOvergaard
Posts: 4
Joined: Thu Jan 07, 2021 10:44 am

Re: SSH to GIT not working

Post by DanOvergaard » Fri Apr 09, 2021 9:21 am

Hi,

Thanks for you reply, but the problem was that Oxygen couldn't find the private key.

The solution was to
- Rename the private key to "id_rsa" (Default name) - Found in C:\Users\"User"\.ssh
- Set the $HOME variable to: C:\Users\"User"

I am not sure the setting the $HOME was necessary as it was a previous change, but I can't rule it out :-)


Note
I would suggest to make it possible to point to the private key in the SSH configuration within Oxygen

/Dan

sorin_carbunaru
Posts: 363
Joined: Mon May 09, 2016 9:37 am

Re: SSH to GIT not working

Post by sorin_carbunaru » Fri Apr 09, 2021 11:47 am

Hi Dan,

SSH know how to automatically load private keys only if they have the default names. I dare say that setting the $HOME variable didn't help you with this issue, but the renaming of the private key file really did the trick.

I added a feature request based on your suggestion (EXM-47801 - for reference purposes). We will update this thread when it will be implemented.

All the best wishes,
Sorin Carbunaru
Oxygen XML Editor

Post Reply