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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- 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
