Private key authentication error in Eclipse for openshift

In Eclipse, when I try to import an existing application from openshift, it gives me the following error -

Failed to clone repository. Authentication error. Make sure you add your private key to your ssh settings.

I followed the following steps: 1. In Eclipse go to Window -> Preferences -> General -> Network Connection -> SSH2 -> Key Management 2. Create RSA key 3. Paste the contents of the public key into the openshift Express account. 4. Save the private key with passphrase.

Even after following the steps I am getting an error when cloning the GIT repo.

I have an error in the Eclipse log file -

!ENTRY 4 0 2012-03-21 10:43:20.161
!MESSAGE Could not clone the repository. Authentication failed.
Please make sure that you added your private key to the ssh preferences.
org.eclipse.jgit.errors.TransportException: ssh:// Connection timed out: connect

!ENTRY 4 0 2012-03-21 10:44:21.838
!MESSAGE Operation did not complete in a reasonnable amount of time


He says that the operation hasn't completed in a while, but my network connection is working absolutely fine.

Do I need other tools to continue? I am new to openhift so I don't have a big idea. I followed the following steps: Setting up a project with opening in Eclipse

and got stuck at step 5.

Please let me know the solution to the problem.

I installed OpenSSH and generated a key pair and this error went away. However, a new error has appeared -

An exception was thrown while creating a local GIT repository. java.lang.reflect.InvocationTargetException

It is related to GIT.

Any suggestion would be very helpful.


source to share

1 answer

Unfortunately, when you create keys with echipse ssh settings, your key will have the wrong permissions. It is created in a way that makes it read / write for your user group (on linux / mac: 660), which is usually not accepted by the ssh subsystem. In these cases, it is enough to correct the permissions to make the key available to you (on linux / mac: 600).

If this does not solve your problem, we will need to continue investigating your problem, I will need more information about your setup:

  • OS?
  • Are you using external ssh binaries (set GIT_SSH environment variable)?
  • Do you have some kind of ssh config (/.ssh/config)? Your key is listed as "IdentityFile"
  • Can you cross-check your key using the git command line? EGit?
  • I bet you added your OpenShift key to the OpenShift web interface?


All Articles