title: Svnkit + ssh authentication error (E170001)
body: <p>I am a bit new here but I need some help with my code. Here it is:</p>
  
  <pre><code>SVNRepositoryFactoryImpl.setup(); 
  
      SVNURL url = 
        SVNURL. 
            parseURIEncoded("svn+ssh://xxx"); 
      File keyFile = 
            new File("C://Users/xxxx/Documents/priave_key/private_key.ppk"); 
      System.out.println("PPK file space:"+keyFile.getTotalSpace());
      SVNSSHAuthentication sshCredentials = 
           new SVNSSHAuthentication(Settings.name, keyFile, Settings.pass, 22, false, url, false); 
      System.out.println(sshCredentials.getPrivateKey()==null);
      System.out.println("hasPrivateKey(): "+sshCredentials.hasPrivateKey());
      SVNUserNameAuthentication authorNameCredentials = new SVNUserNameAuthentication(Settings.name, false); 
      SVNPasswordAuthentication passwordCredentials =  new SVNPasswordAuthentication(Settings.name, Settings.pass, false); 
  
      ISVNAuthenticationManager authManager = 
          new BasicAuthenticationManager(new SVNAuthentication[] { 
                       sshCredentials, 
                       authorNameCredentials, 
                       passwordCredentials}); 
      SVNRepository repository = SVNRepositoryFactory.create(url); 
      repository.setAuthenticationManager(authManager); 
  
      try { 
  
          SVNDirEntry info = repository.info("", -1); 
          System.out.println(info); 
      } finally { 
          repository.closeSession(); 
      } 
  </code></pre>
  
  <p>So after running this I get this output:</p>
  
  <pre><code>PPK file space:107374178304
  false
  hasPrivateKey(): true
  Exception in thread "main" org.tmatesoft.svn.core.SVNAuthenticationException: svn:     E170001: Authentication required for 'xxx@svn+ssh://xxx'
      at     org.tmatesoft.svn.core.internal.wc.SVNErrorManager.authenticationFailed(SVNErrorManager.jav    a:47)
      at     org.tmatesoft.svn.core.internal.wc.SVNErrorManager.authenticationFailed(SVNErrorManager.jav    a:41)
      at 
  
  org.tmatesoft.svn.core.auth.BasicAuthenticationManager.getNextAuthentication(BasicAuthentic    ationManager.java:223)
  at     org.tmatesoft.svn.core.internal.io.svn.SVNSSHConnector.open(SVNSSHConnector.java:141)
  at org.tmatesoft.svn.core.internal.io.svn.SVNConnection.open(SVNConnection.java:77)
  at     org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.openConnection(SVNRepositoryImpl.j    ava:1252)
  at     org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.info(SVNRepositoryImpl.java:1195)
      at SVNTestNew.main(SVNTestNew.java:40)
  </code></pre>
  
  <p>I think this can be a problem with <code>SVNSSHAuthentication</code> class because it gives null for <code>getPrivateKey()</code> and true for <code>hasPrivateKey(</code>.) Or is this a wrong idea? Can anyone tell me how can this problem be solved?</p>