I’m running Apache Netbeans 12 on Windows and I’m really struggling to connect to my github repositories using an SSH connection. I get the strong impression that this has been a problem for Netbeans users for a long time. What I’ve tried so far:
- I installed openSSH in the Cygwin I use to run a terminal within Netbeans. This allowed me to use ssh-agent.
- I attempted to get ssh-agent running and add the relevant private key that matches the public key in my Git repo.
- I have no trouble cloning this repo using git bash and a standalone Cygwin shell (now that I have ssh-agent running), but the Team->Git->Glone wizard in Netbeans gives me this connection error:
- Here’s the documentation for “Cloning a Repository from GitHub via
SSH protocol" with github in Netbeans 7 or 8:
https://netbeans.org/kb/docs/ide/git.html#github - And here’s the documentation for “Cloning a Repository from GitHub
via SSH protocol” for Netbeans 12:
https://netbeans.apache.org/kb/docs/ide/git.html - As far as I can tell, the documentation explaining how to clone a repository via SSH protocol has remained unchanged, but the bug reported here in version 7: https://bz.apache.org/netbeans/show_bug.cgi?id=251253 despite being closed, remains unsolved for me. I tried changing the .ssh folder and I get exactly the same error with Netbeans 12.
- https://netbeans.org/nonav/bugzilla/show_bug.cgi?id=199263 continues the saga with a lot of pressure to close issues.
- This bug report, https://netbeans.org/nonav/bugzilla/show_bug.cgi?id=218918, reflects my experience:
Dev builds, but true as long as I can remember. I am unable to use NetBeans to perform any Git operations requiring SSH authentication: pushing to GitHub, pulling from a private repository, etc. The same operations using command-line Git work fine, but in NetBeans I am prompted for a username and password, or for a private key with passphrase. This is unnecessary from the command line as I use ssh-agent to unlock my private key without needing to type in the passphrase every time; apparently the Git library used by NB does not manage to communicate with ssh-agent so it fails.
This is the kind of response (about Netbeans 7 remember, I'm still struggling with version 12) which I find frustrating:
“Seems that the automatic use of ssh-agent is now working; maybe was only broken for repositories which I had tried to push/pull from in NetBeans prior to this fix.”
Not it’s not. I simply can’t get Netbeans to clone a github repository following the standard wizard documentation.
- Here is a characteristic StackOverflow question about Netbeans 8: Netbeans 8.2 Can't Verify Git Credentials? There are no clear answers or useful comments, but the person has the same problem as I do with SSH connections.
- This bug report is the same old story: https://bz.apache.org/netbeans/show_bug.cgi?id=247761 and includes to this idea:
John Gibson commented on GitLab CE issue #624 (https://gitlab.com/gitlab-org/gitlab-ce/issues/624#note_299061) that he encountered a similar error. He explains that he "discovered that all of the available ciphers on the server were at least 256 bits. Standard Oracle Java ships with crypto that's restricted to 128 bits for some algorithms. After installing the unlimited strength crypto package from Oracle the issue went away. Note that the unlimited strength package is only legally available in the US. If you're outside of the US then I think that OpenJDK will work instead."
I followed the link he mentioned (http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html), downloaded the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7 and followed the steps in the readme-file that came with the download.
- I tried this download and the readme.txt clearly states:
“Current versions of the JDK do not require separate unlimited policy files. They are provided for use with older versions. The unlimited policy files for earlier releases are required only for JDK 7 updates earlier than 7u171.”
So, that doesn’t work either. I am absolutely stumped. What do I have to do to get the latest, shiniest version of Netbeans to work smoothly with github and SSH connections?