Getting an SSL error with Mercurial on Bitbucket due to TLS - mercurial

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?

I tried the
[ui]
tls = False
This worked for me, though I do not get why. bitbucket only uses tls 1.2, and this seems like it would turn it off. Does anyone know why this worked? It is just bugging me.

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.

As you i had the same issue , i had done the above mentioned solution in my VirtualMachine that solved the problem though, whereas in my realtime server this did not solve. The only option you got left is changes your hgrc file within the repository ie "reponame/.hg/hgrc" and update the default path to "ssh://hg#bitbucket.org/'reponame'" instead of "https:#bitbucket.org/'reponame'" its not a good solution but will work until Bitbucket support team comes up with some solution.
Doing this has solved my issue.

Just a Suggestion can you create a "hgrc" file and add
[ui]
tls = False
and give it a try.

Related

TortoiseHg 3.6.3 broke mercurial keyring?

I upgraded to Tortoise 3.6.3 yesterday and now I am prompted every time I pull or push a repo. The keyring is set properly, and my user name is in the url.
Any ideas on what may be wrong? Did 3.6.3 break keyring?
Issue 4401 "mercurial_keyring always asks for user/password" from time of 3.6.2 closed as pure extension-specific and contains solution: don't use username in URL anymore
Here is what to put into .hg/hgrc:
[auth]
default.username=myname
default.prefix=http://myrepo
A good way to debug issues like this is to run merciural from the command line with the debug flag, as in:
hg pull --debug
This will clearly indicate if there are problems getting the repo, user name, and password.
UPDATE: A new version of TortoiseHG has been released (3.8.3 at the time of writing) and fixes this issue: upgrading to latest version should be enough.
I had this exact same problem and found the following investigation article to be quite helpful to better understand what't going on (I'm not the author, BTW).
To cut it short, it seems a bug of the mercurial_keyring extension v1.0.1, introduced in TortoiseHG 3.6.2, which also appears to be fixed in v1.1.1.
If you're into Python compiling, it should be possible to upgrade it manually into TortoiseHG by getting it from its official bitbucket repo, compile it and manually place it into TortoiseHG's /lib/library.zip file (backup it beforehand might be wise): if you're not, you have 2 options:
1) clone the bitbucket repo to your HDD and then configure your Mercurial installation to use the new version of that extension module by writing the following in your C:\Users\USERNAME\mercurial.ini file (which was what I did):
[extensions]
mercurial_keyring = /path/to/mercurial_keyring/mercurial_keyring.py
(Notice: you might also have to put the path in your PATH or PYTHONPATH env variable, depending if you already have Python and/or Mercurial installed on your machine).
2) wait for the next TortoiseHG release that will contain the updated version.

TortoiseHg / Mercurial 3.6.2 x64 not remembering credentials

I recently upgraded to TortoiseHg 3.6.2 x64 and since then the mercurial_keyring setting does not work. I had previously followed the instructions here (the ones that show how to enable mercurial_keyring extension). Here's what I have:
Mercurial.ini
[extensions]
mercurial_keyring =
Local Repo .hg\hgrc
[paths]
http://username#repo.url/repo.hg
Now, ever time I try to pull/push etc from TortoiseHg, I am asked for my username and password. When I disable mercurial_keyring, then I am just asked for my password.
If I downgrade to TortoiseHg 3.5.2 x64 then it works again.
Any ideas please? Is there a minimum compatible server-side Mercurial version for this to work with TortoiseHg 3.6.2? I think we are running 2.7.1 on the server under Linux.
Thanks.
This appears to be a change in behaviour caused by TortoiseHg 3.6.2. It looks to me like a bug, although as of yet is unconfirmed if it was an intentional change or not.
The relevant mercurial_keyring issue is here. The only reason I wonder if it's intentional or not is that the current docs state:
Simpler form with url-embedded name can also be used:
[paths] bitbucket = https://John#my.server.com/hgrepo/someproject/
but is not recommended.
The workaround appears to be to specify the username outside of the URL.
[paths]
myremote = https://my.server.com/hgrepo/someproject
[auth]
myremote.prefix = https://my.server.com/hgrepo
myremote.username = John

Chromedriver failing to launch or connect

Up until today, I have been using chromedriver to drive my watir-webdriver tests, and I have had no problems. My server still works and runs tests on the same version of the chromedriver and chrome.
I have tried updating to the latest chromedriver, which is the chromedriver 2 experimental build. This fails due to what I can only assume are still bugs being worked out of it.
I have also tried rolling back to the previous version of chromedriver with no success.
If anyone has any experience with this, I would really appreciate your expertise. I am sure it will turn out to be something simple I have overlooked.
gem versions:
watir-webdriver (0.6.2)
selenium-webdriver (2.29.0)
cucumber (1.2.1)
trace from the chromedriver below
Started ChromeDriver port=9517 version=26.0.1383.0
log=C:\Projects\oms_acceptance_tests\src\chromedriver.log
[6136:5300:0212/122320:ERROR:master_preferences.cc(110)] Failed to read master_preferences file at C:\Program Files (x86)\Google\Chrome\Application\master_preferences. Falling back to default preferences.
[6136:5300:0212/122320:ERROR:gpu_info_collector_win.cc(82)] Can't retrieve a valid WinSAT assessment.
test\automation\proxy_launcher.cc(107): error: Value of: app_launched
Actual: 5
Expected: AUTOMATION_SUCCESS
Which is: 0
Error while awaiting automation ping from browser process
[0212/122321:ERROR:proxy_launcher.cc(556)] Failed to ConnectToRunningBrowser
[0212/122321:ERROR:automation_proxy.cc(319)] Channel error in AutomationProxy.
Unable to either launch or connect to Chrome. Please check that ChromeDriver is up-to-date. Using Chrome binary at: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe (Selenium::WebDriver::Error::UnknownError)
I would trying downloading newer version of chromedriver. Worked for me when I experienced similar issues.
To get rid of the gpu winsat error, try to update your display adapter.

MacOS Mountain Lion Mercurial postreview:

I am issuing the following command:
hg postreview -o -e 4714 tip --debug
with this result:
using http://....
sending capabilities command
abort: repository 'http://...' is not local
(I shortened the URLs, the url is the right one)
This error does not seem to originate in the postreview extension, but I can not figure out what the problem is. Does someone know?
Thanks. Chris
=============
System:
I have OS X 10.8 (12A269) installed
Python: Python 2.7.2 [GCC 4.2.1 Compatible ..
Installed mercurial through mercurial-2.3+20120807-py2.7-macosx10.8.mpkg which was downloaded from http://mercurial.berkwood.com/
I use the extension postreview: https://code.google.com/p/mercurial-reviewboard/
This is a problem since mercurial 2.3
I have updated my clone of mercurial reviewboard plugin to fix it here:
https://bitbucket.org/windix/mercurial-reviewboard/
Note that, this is not the official mercurial reviewboard plugin (which is at http://code.google.com/p/mercurial-reviewboard/). The one I am using is with outogoing support (so you can send all the outgoing changesets for review at once).
There has been an issue submitted to the official one here:
http://code.google.com/p/mercurial-reviewboard/issues/detail?id=48
so hopefully someone will fix it there

Upgraded to Mercurial 1.7 client, getting abort: requirement '<html>' not supported

I think it's a config error based on similar, but not identical answers to errors I found such as requirement 'fncache' not supported.
No idea where this is coming from, but it started happening AFTER the upgrade.
This is usually a problem with the server setup. It means the server does not return the expected answer.
Are you using static-http? (and please add the command line you are using when you get the error).
It seems that there is an old hg executable in your path. The error message comes when a client tries to acces a local repository which is created by a higher hg version.