I've been using bitbucket without problems for a couple of months now by using JRE 1.6. But, since last week, I can suddenly not "reach" to my repository URL from the JGit Java code.
I get the following error message:
org.eclipse.jgit.api.errors.TransportException: https://bitbucket.org/../xyz.git: cannot open git-upload-pack at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:190) at com.databorough.xinitializer.ui.git.GitHelper.isValidRemoteRepository(GitHelper.java:192) at com.databorough.xinitializer.ui.git.GitHelper.isValidRepository(GitHelper.java:137) at com.databorough.xinitializer.ui.git.GitHelper.main(GitHelper.java:609) ... Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190) ... 5 more Caused by: java.lang.RuntimeException: Could not generate DH keypair at com.sun.net.ssl.internal.ssl.DHCrypt.<init>(DHCrypt.java:114) ... 13 more Caused by: java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 1024 (inclusive) at com.sun.crypto.provider.DHKeyPairGenerator.initialize(DashoA13*..) at java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:627) at com.sun.net.ssl.internal.ssl.DHCrypt.<init>(DHCrypt.java:107) ... 20 more
The problem has apparently nothing to do with my Java code.
So I was wondering that the SSL problems could result a configuration change on the bitbucket web server side?
Not an answer I'm afraid but just adding that I can see the same error, in this case connecting from teamcity. This suddenly happened last week.
I'll keep you posted if I find a solution but if anyone else can see this or has advice that would be useful.
So I did in the end upgrade to JDK 1.7, just took me a while to work out hwo to get Teamcity to use the newer version. This resolved the problem.
So if you are just talking about JGit I would consider upgrading your Java verison on you machine. 1.7 is probably the bear minium nowdays anyway, but you should be able to go up to 1.8 without any problems.
We have also started facing the same issue since last few days. On investigation I found out that this occurs when the keysize sent by the Server to client is greater than 1024 . So does that mean there has been a change on bitbucket ?
We are currently on JDK 1.6 and unfortunately we cannot upgrade to a higher version of Java in near future. I have spent a lot of time looking at google and tried the following
1) Have used JCE unlimited strength provided by Oracle from here :
2) Used bouncy castle as the JCE provider. This leads to another exception :
Caused by: java.lang.ArrayIndexOutOfBoundsException: 64
Can someone please help .
I dont know what develop environment you are using, but if it's Eclipse you first need to create your SSH key (Window->Preferences->General->Network Connections->SSH2). (this goes for Eclipse Kepler)
Create the new key (be sure to save it), and copy its public part and registrer it into Bitbucket -> user settings-> SSH keys.
Then you can clone your repo using the URI specified by bitbucket on the repo overview page (should be something like firstname.lastname@example.org:******/****.git
As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs