You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/03/04 23:55:54 UTC

[GitHub] [netbeans] Ojambo opened a new issue #3700: Outdated Jcraft JSCH Library Causes Incorrect Credentials For Remote Git Repository

Ojambo opened a new issue #3700:
URL: https://github.com/apache/netbeans/issues/3700


   ### Apache NetBeans version
   
   Apache NetBeans 12.6
   
   ### What happened
   
   Originally reported on 2021-09-27 here https://issues.apache.org/jira/browse/NETBEANS-6067
   
   I am running Fedora 35 and NetBeans 12.6 and just upgraded to 13.  I get incorrect credentials when I attempt a git push.  It works fine on the command line so I can up with a workaround until this issue is resolved.  A quick alternative for Netbeans is to use a fork of JSch-01.55 here [https://github.com/mwiede/jsch ](https://github.com/mwiede/jsch)that is actually updated allowing modern encryption algorithms.
   
   **Workaround**:
   Perform a commit using the GUI in NetBeans then on the command line run "git push" in the folder containing your project and/or local git repository.
   
   **Problems**:
   - JSch only supports weak ssh-rsa which is disabled by default in OpenSSH 8.8
   - JSch has not been updated since 2018 according to SourceForce 
   - Problematic key headers due to OpenSSH 7.8 or newer having  "----BEGIN OPENSSH PRIVATE KEY---" instead of "---BEGIN RSA PRIVATE KEY----"
   - Replacing the official JSch JAR file with the one by mwiede did not work for me, looks like NetBeans hard-coded something in their version of EGit.
   
   **References**:
   1. Matez Blog the future of jsch without ssh-rsa https://www.matez.de/index.php/2020/06/22/the-future-of-jsch-without-ssh-rsa
   2. Bug 520927: moving away from JSch https://www.eclipse.org/lists/jgit-dev/msg03696.html
   3. Gerrit 3.4.0 Disables JCraft JSch client library by default https://www.gerritcodereview.com/3.4.html
   4. JSch Last SourceForge Update https://sourceforge.net/projects/jsch/files/jsch/
   5. Invalid Private Key When Using JSch https://stackoverflow.com/questions/53134212/invalid-privatekey-when-using-jsch
   
   ### How to reproduce
   
   Git push will result in incorrect credentials in Netbeans if using recent versions of OpenSSH on the remote server or stronger encryption methods.
   
   ### Did this work correctly in an earlier version?
   
   No
   
   ### Operating System
   
   Locally Linux Fedora 35: Remotely Debian 11, and CentOS 7.9
   
   ### JDK
   
   OpenJDK 11.0.14.1
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   This occurs for every GIT Push.
   I also tried locally it without port numbers from a laptop to the work station both running Fedora 35.
   The cause is that the jcraft JSCH library is old.  Google already moved away from it and Eclipse is in the process of replacing it
   
   I have attached a message.log file after removing the original remote repository.
   
   [username_netbeans_13_var_log_messages.log](https://github.com/apache/netbeans/files/8189338/username_netbeans_13_var_log_messages.log)
   .
   
   ### Are you willing to submit a pull request?
   
   _No response_
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] matthiasblaesing commented on issue #3700: Outdated Jcraft JSCH Library Causes Incorrect Credentials For Remote Git Repository

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on issue #3700:
URL: https://github.com/apache/netbeans/issues/3700#issuecomment-1059813816


   I created a pull request and here is a test build:
   
   https://doppel-helix.eu/NetBeans-dev-dev-ff00b6542e7a8c5e8fa39a0d8f0df663b7061e0f-release.zip
   
   I tested ecdsa and ed25519 keys on linux. Support for SSH Agents was only tested with an rsa key on Windows and Linux (PAgent and SSHAgent). The ssh bundle was marked to depend on:
   
   - JNA (Integration of PAgent)
   - JUnixsocket (Integration of SSHAgent)
   - Bouncy Castle (Support for more exotic Keys on not so new JDKs)
   
   The updated SSH library integrates support for agent integration, so the dedicated NetBeans modules was removed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] norrisjeremy commented on issue #3700: Outdated Jcraft JSCH Library Causes Incorrect Credentials For Remote Git Repository

Posted by GitBox <gi...@apache.org>.
norrisjeremy commented on issue #3700:
URL: https://github.com/apache/netbeans/issues/3700#issuecomment-1059976475


   As on the caretakers of this newer JSch fork, please let me know if you have any questions about integrating it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] Ojambo commented on issue #3700: Outdated Jcraft JSCH Library Causes Incorrect Credentials For Remote Git Repository

Posted by GitBox <gi...@apache.org>.
Ojambo commented on issue #3700:
URL: https://github.com/apache/netbeans/issues/3700#issuecomment-1059818540


   I tested the DEV version and was able to successfully perform a GIT push in the IDE. 
   The fix should also take care of Issue newer ssh keys not accepted for remote synchronization #3691 https://github.com/apache/netbeans/issues/3691


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] matthiasblaesing closed issue #3700: Outdated Jcraft JSCH Library Causes Incorrect Credentials For Remote Git Repository

Posted by GitBox <gi...@apache.org>.
matthiasblaesing closed issue #3700:
URL: https://github.com/apache/netbeans/issues/3700


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] mbien commented on issue #3700: Outdated Jcraft JSCH Library Causes Incorrect Credentials For Remote Git Repository

Posted by GitBox <gi...@apache.org>.
mbien commented on issue #3700:
URL: https://github.com/apache/netbeans/issues/3700#issuecomment-1059750129


   @Ojambo thank you for the detailed report.
   
   I personally prefer to use the shell for most git tasks so I never noticed. I put NB 14 milestone on this issue since i think we should try to fix this if there is time/interest.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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