Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Over the weekend, our IT department installed an updated firewall. As a result, we are no longer able to pull from (and push to) the repository on BitBucket.

Attempting to perform a Mercurial operation (pull, for example) results in the message [Errno 10053] An established connection was aborted by the software in your host machine.

Obviously something is going wrong in the communication sequence, but I am not familiar enough with the protocol to be able to identify what. I suspect that Mercurial expects to use a port that is now blocked. Which port(s) should be open to allow Mercurial to operate correctly with repositories hosted on

share|improve this question

1 Answer 1

up vote 5 down vote accepted

There are two ports in use, depending on the protocol:

  • HTTPS: port 443. This is used for hg clone, hg pull, and hg push with<user>/<repo>/ URLs.

    It is also used for normal browsing on Bitbucket using the webbrowser. In other words, if you can access Bitbucket with you browser, then Mercurial should also work.

  • SSH: port 22. This is used for hg clone, hg pull, and hg push with ssh://<user>/<repo>/ URLs.

Mercurial is not doing anything special — it just sends normal traffic on these ports.

Your IT department should be able to tell if they're blocking connection attempts from the inside of their firewall (by looking at their logs). You should also look into your proxy settings if the problem persists.

share|improve this answer
Thanks Martin, that's what I thought. Our IT department was seeing a blockage. The firewall was blocking the outbound traffic from the internal machines because the firewall's "HTTP protocol TLS/SSL" option was not enabled, and it needed to be. – Richard J Foster Mar 27 '12 at 18:13
@RichardJFoster: No problem, glad you got it solved! Now we have the ports documented here for further reference. – Martin Geisler Mar 27 '12 at 21:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.