HTTP Error 502 Bad Gateway

Issue #1938 resolved
created an issue


I new to scm tools and bitbucket. I tried to setup a new Repo according to your manual, part

However I'm getting a HTTP Error 502 Bad Gateway Error when I try to push hg push

Any hints what I'm doing wrong? Kind regards Stefanie

Comments (29)

  1. Paresh Masade

    I am also facing the same problem.. my ssh is also not working... am new to SSH and using it on windows using Putty... the link mentioned does not give more details..

    any idea what does it mean? bad gateway?

  2. Dylan Etkin

    Hi Paresh,

    I am afraid we do not have enough details to look into this.

    Can you please email with:

    1. the commands you are trying to run 2. the client you are using to interact with hg 3. the full output when the command fails 4. have you uploaded your public ssh key to bitbucket?



  3. Shane Doerksen

    You can add me to the list of people who are experiencing a 502 Bad Gateway error with BitBucket all of a sudden (Sept. 23rd, 2018). Same mercurial repository as always, with the same hgrc file, but today when I tried to push my changes to BitBucket, I got a 502 Bad Gateway error. I've been trying to push this for 30 minutes with no success. I'll try via SSH and update this if it works.

  4. Блажо Ђуровић

    Same here. Using Mercurial I just tried to upload the changes. It seems to connect to the server but then breaks once it starts looking for changes:

     hg push<username>/<repo>
    pushing to<username>/<repo>
    searching for changes
    HTTP Error: 502 (Bad Gateway)
    [command returned code 255 Sun Sep 23 21:02:08 2018]
  5. Shane Doerksen

    @Блажо Ђуровић - Yes, I'm using the command line hg tool on Ubuntu Linux, and I see the 502 error as well. I sent a support ticket to hours ago but haven't heard back.

  6. Sid Paral

    Service has been down for at least 18 hours.

    Identical problem; ours is a professional operation, we are paying for the service, and it is down and ironiously marked RESOLVED. First failure registered Saturday 9/22 ~10pm PDT. Not been able to push since, pull keeps working.

    Fix ASAP, please. If not resolved by Monday morning, my first action (as I can't code) will be to bring it up with our COO and get budgeted to start looking at alternatives.

  7. Shane Doerksen

    Just to keep everyone in the loop who is coming here from Google, it looks like as of 15 minutes ago Atlassian is aware of the issue and working on it. I just received this update on my support request:

    Ronald Chia commented:

    Hi there,

    Thank you for getting in touch with Bitbucket Support Team. Our engineering team has been notified and is currently investigating the issue causing this error.

    Based on our current investigation, the issue happens while pushing using Mercurial via https protocol. Hence, as a workaround, we would suggest using SSH protocol while our team working on it. Set up an SSH key - Atlassian Documentation

    We apologize for any inconvenience, we will give you an update when we know more on the issue. In addition to it, we've updated our status page and we would suggest subscribing to the incident reports for more updates in regards to it as well:

    Please, feel free to let us know if you have any other questions.

    Thank you. Bitbucket Cloud Support team.

  8. Sid Paral

    After I sent an email to, and a colleague contacted BitBucket billing, things appear resolved for the moment. I have been notified that "Degraded service" got "restored", no reason given. Tested from 2 clients (Win7 vs. Win10, both TortoiseHg 4.7), works as of ~6pm PDT Sunday. Good job!

  9. Log in to comment