Search code examples
mercurialbitbucketmercurialeclipse

Getting an SSL error with Mercurial on Bitbucket due to TLS


It seems that Bitbucket has now blocked TLS 1.0 and 1.1.

I am working in Eclipse on Mac OSx 10.12.6 using the MercurialEclipse (hg) 2.2 plugin.

I was receiving SSL handshake errors whenever I tried to pull from the remote Bitbucket repository.

I tried updating the plugin and doing a fresh install, but it still gave the same error.

Then I tried downloading and installing the latest Mercurial package (4.8) from the mercurial web site.

After doing this the error changed to this:

warning: connecting to bitbucket.org using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info abort: error: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:590)

I tried downloading the latest Python, both 3.7.1 and 2.7.15 as I read on Mercurial's site linked in the warning that that it had something to do with Python's OpenSSL implementation, but I still get the same error.

Any suggestions on how I can get Mercurial to work with Bitbucket via TLS 1.2?


Solution

  • I was on Mac OS X 10.12 "Sierra". I updated to 10.13 "High Sierra" and it fixed the issue.

    Notably... when I run openssl version now, I get: LibreSSL 2.2.7. Where as before on 10.12 I got: OpenSSL 0.9.8zh 14 Jan 2016.