Subclipse + SVNKit keeps asking for credentials when connecting through svn+ssh
Asked Answered
R

5

6

I'm using Subclipse to connect to an SVN repository via svn+ssh and a private key (the server has the paired public key). The interface is SVNKit (Pure Java). After I enter the svn+ssh://repository... address I am prompted for credentials. I specify the username and private key file (I did not set a passphrase so it is left blank) and confirm. The window pops up again and this goes on indefinitely. No console message is provided.

Note 1: Marking "Save information" seems to have no effect. If there is a cache I'm supposed to be deleting this could help. I already deleted the keyring file in eclipse.

Note 2: I wasn't sure if the private key should be in SSH2 or OpenSSH formats, but I tried both and there is no difference.

Note 3: I cannot find org.tmatesoft.svn folder under plugins in eclipse. I installed SVNKit from the eclipse update site http://eclipse.svnkit.com/1.7.x.

Specifications: Windows 7 64 bit, eclipse 4.2.1 64 bit, Subclipse 1.8.16, Subversion client adapter 1.8.3, SVNKit client adapter 1.7.5.1.

If there is any other information or log file I should provide I would be happy to do so.

Rosenkranz answered 6/11, 2012 at 15:47 Comment(2)
I had this issue and solved it by using a private key in OpenSSH format (I know you tried this but thought I'd point out that this is what's required) - I used puttygen to create this file (Conversion -> Export OpenSSH Key).Dowlen
Martin's comment (while "correct") is identical to a later answer - so I suggest to vote there instead of the comment. 4,5 years later and the SVNKit still keep asking for credentials without any hint when you use a not-OpenSSH format...Thermostatics
R
2

Eventually it turned out that there was a problem with they key. It was encrypted with DSA instead of RSA and the server wasn't set up for it.

Why I got no message about a bad key pair is beyond me, but with a correct key it worked.

Rosenkranz answered 11/5, 2015 at 21:13 Comment(0)
S
4

I had a similar problem and figured out that I tried to use the private key generated by puttygen, but SVNKit needs an OpenSSH key.

My solution was:

  1. Start PuTTY Key Generator
  2. Load private key
  3. Conversions \Export OpenSSH key
  4. Select openSSH Key in Eclipse
Snowblind answered 29/3, 2016 at 12:25 Comment(1)
Worked fine with Neon + latest Subclipse + SVNKit 1.8.x (from polarion update site)Thermostatics
C
2

1- under Window => Preferences SVN (or team => svn depending on your version), make sure you selected a library available in yourSystem... for example SVNKIT(Pure Java) .... instead of JAvaHL... which often missing

2- under Window => Preferences, search for "Secure Storage" and setup a master password (usually clicking on Change Passowrd...). This isn't your svn password but for some reasons i ignore, if this master password is not set, Eclipse won't be able to store and retrieve your svn password when you click the save password..

Culhert answered 31/3, 2015 at 16:24 Comment(1)
If you don't have a master password set already Eclipse will do this automatically when importing the first credentials in secure storage. Message: > A master password was created in Eclipse Secure Storage. If you ever need to recover your password, you need a password hint. Do you want to provide a password hint? [Yes|No]Thermostatics
R
2

Eventually it turned out that there was a problem with they key. It was encrypted with DSA instead of RSA and the server wasn't set up for it.

Why I got no message about a bad key pair is beyond me, but with a correct key it worked.

Rosenkranz answered 11/5, 2015 at 21:13 Comment(0)
P
1

I fixed this by generating a SSH key in PEM format

ssh-keygen -m pem

You can enable SVNKIT logging by creating a .options file in the eclipse home directory. The file should contain the following text:

org.tmatesoft.svnkit/debug=true
org.tmatesoft.svnkit/debug/error=true
org.tmatesoft.svnkit/debug/warning=true
org.tmatesoft.svnkit/debug/info=true
org.tmatesoft.svnkit/debug/fine=true
org.tmatesoft.svnkit/debug/trace=true

Then run eclipse with the -debug command line argument

Plait answered 29/7, 2020 at 0:59 Comment(0)
R
-2

I would not worry about Note 3. If you open Eclipse Preferences and go to Team > SVN and you can select SVNKit, then it is installed and available. On my system, it is a JAR in the plugins folder.

SVNKit is in charge of the SSH process, so you could visit their forums and email [email protected] for information and ideas.

My recollection is that they normally cache the information for the duration of the Eclipse session, so not sure what is going on. If you keep responding to all the prompts does everything work? If not, then maybe you are being prompted because it cannot successfully use your credentials?

They have a Troubleshooting section in their wiki: http://wiki.svnkit.com/Troubleshooting

Rhyton answered 6/11, 2012 at 16:3 Comment(2)
In the wiki, I looked under "SVNKit is used as Eclipse plugin" and the instructions there refer me to path "ECLIPSE_HOME/plugins/org.tmatesoft.svnkit_version/.options", which is why I added Note 3. I also have only the JAR file. I believe this also does not allow me to import org.tmatesoft.svn.core packages if I try to access the repository through my own Java code (though this is not mandatory for me).Rosenkranz
You can unpack a jar file and it should still work. Just move the jar file somewhere after you unpack it.Rhyton

© 2022 - 2024 — McMap. All rights reserved.