Juan F Arjona created NETBEANS-6310:
---------------------------------------

             Summary: Netbeans fails on ssh with GitBucket
                 Key: NETBEANS-6310
                 URL: https://issues.apache.org/jira/browse/NETBEANS-6310
             Project: NetBeans
          Issue Type: Bug
          Components: versioncontrol - Git
    Affects Versions: 12.5, 12.6
            Reporter: Juan F Arjona


I am using GitBucket to keep my code.  I can push and pull using the command 
line (both in cygwin and DOS) using my private keys and/or username/password 
authentication.

I have seen a report where the URL may affect it, but in my case the URL is 
proper:

ssh://[email protected]:10022/username/project.git

Works perfect with any other git tool, except the one that I really want: 
Netbeans.

On the logs, it shows the following Exception: (please note, URLs and usernames 
have been changed for security reasons)

INFO [org.netbeans.modules.git]: 
ssh://[email protected]:10022/username/projectgit: invalid privatekey: 
[B@665f0ecd
com.jcraft.jsch.JSchException: invalid privatekey: [B@665f0ecd
    at com.jcraft.jsch.KeyPair.load(KeyPair.java:664)
    at com.jcraft.jsch.KeyPair.load(KeyPair.java:561)
    at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40)
    at com.jcraft.jsch.JSch.addIdentity(JSch.java:406)
    at com.jcraft.jsch.JSch.addIdentity(JSch.java:366)
    at 
org.netbeans.libs.git.jgit.JGitSshSessionFactory.setupJSchIdentityRepository(JGitSshSessionFactory.java:184)
    at 
org.netbeans.libs.git.jgit.JGitSshSessionFactory.setupJSch(JGitSshSessionFactory.java:197)
Caused: org.eclipse.jgit.errors.TransportException: 
ssh://[email protected]:10022/username/project.git: invalid privatekey: 
[B@665f0ecd
    at 
org.netbeans.libs.git.jgit.JGitSshSessionFactory.setupJSch(JGitSshSessionFactory.java:199)
    at 
org.netbeans.libs.git.jgit.JGitSshSessionFactory.getSession(JGitSshSessionFactory.java:94)
    at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:107)
    at 
org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:306)
    at 
org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:143)
    at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:127)
    at org.eclipse.jgit.transport.Transport.push(Transport.java:1335)
    at org.eclipse.jgit.transport.Transport.push(Transport.java:1381)
    at 
org.netbeans.libs.git.jgit.commands.PushCommand.runTransportCommand(PushCommand.java:97)
Caused: org.netbeans.libs.git.GitException$AuthorizationException: 
ssh://[email protected]:10022/username/project.git: invalid privatekey: 
[B@665f0ecd
    at 
org.netbeans.libs.git.jgit.commands.TransportCommand.handleException(TransportCommand.java:235)
    at 
org.netbeans.libs.git.jgit.commands.PushCommand.runTransportCommand(PushCommand.java:123)
    at 
org.netbeans.libs.git.jgit.commands.TransportCommand.run(TransportCommand.java:168)
    at org.netbeans.libs.git.jgit.commands.GitCommand$1.run(GitCommand.java:57)
    at org.netbeans.libs.git.jgit.commands.GitCommand$1.run(GitCommand.java:54)
    at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
    at 
org.netbeans.libs.git.jgit.commands.GitCommand.execute(GitCommand.java:54)
    at org.netbeans.libs.git.GitClient.push(GitClient.java:1036)
    at org.netbeans.modules.git.client.GitClient$42.call(GitClient.java:644)
    at org.netbeans.modules.git.client.GitClient$42.call(GitClient.java:640)
    at 
org.openide.util.NetworkSettings.suppressAuthenticationDialog(NetworkSettings.java:138)
    at 
org.netbeans.modules.git.client.GitClient$CommandInvoker$1$1.call(GitClient.java:931)
    at 
org.netbeans.modules.git.client.GitClient$CommandInvoker$1$1.call(GitClient.java:937)
    at 
org.netbeans.modules.git.client.GitClient$CommandInvoker$1$1.call(GitClient.java:937)
    at 
org.netbeans.modules.git.client.GitClient$CommandInvoker$1$1.call(GitClient.java:937)
    at 
org.netbeans.modules.git.client.GitClient$CommandInvoker$1$1.call(GitClient.java:937)
    at 
org.netbeans.modules.git.client.GitClient$CommandInvoker$1$1.call(GitClient.java:937)
    at 
org.netbeans.modules.git.client.GitClient$CommandInvoker$1$1.call(GitClient.java:937)
    at 
org.netbeans.modules.git.client.GitClient$CommandInvoker$1.call(GitClient.java:956)
    at 
org.netbeans.modules.git.client.GitClient$CommandInvoker.runMethodIntern(GitClient.java:968)
    at 
org.netbeans.modules.git.client.GitClient$CommandInvoker.runMethod(GitClient.java:893)
    at 
org.netbeans.modules.git.client.GitClient$CommandInvoker.runMethod(GitClient.java:875)
    at 
org.netbeans.modules.git.client.GitClient$CommandInvoker.access$400(GitClient.java:869)
    at org.netbeans.modules.git.client.GitClient.push(GitClient.java:640)
[catch] at 
org.netbeans.modules.git.ui.push.PushAction$3.perform(PushAction.java:262)
    at 
org.netbeans.modules.git.client.GitProgressSupport.performIntern(GitProgressSupport.java:92)
    at 
org.netbeans.modules.git.client.GitProgressSupport.run(GitProgressSupport.java:85)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
    at 
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
    at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
    at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

 

I have tried with both RSA and ED25519 ssh keys.   The key lengths are:

id_rsa:  3072 SHA256:zK2W.... (RSA)

id_ed25519:  256 SHA256:zZuv ... (ED25519)

 

I cannot see anything else with value on the logs, if you need more info, 
please let me know how to obtain more detailed logs.

 

Thanks.

 

Juan

 

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to