git clone failure: error: RPC failed; result=22, HTTP code = 504

I am trying to clone a repo hosted on BigBucket to my BeagleBone Black derivative, currently running git v1.7.10.4. 

I consistently get the following error:

> git clone https://<myaccount>@bitbucket,org/<myrepo.git>

> Cloning into <myrepo> ...

> Password for https://<myaccount>@bitbucket.org:

error: RPC failed; result=22, HTTP code = 504
fatal: The remote end hung up unexpectedly

What would cause this error? Is this a compatibility issue with git or perhaps as the result of some configuration limitation?

3 answers

1 accepted

This was because I was still using https to access my repo, once I switched my repo to support SSH, everything was good. I am now using SSH to access my repo from my developer account (Visual Studio/Windows) and my embedded device (Linux), and I am able to clone and pull code without issues.

it's work to my problem.

http://www.checkupdown.com/status/E504.html

Do you have some sort of proxy server that could be timing out?

0 vote

According to the HTTP specification, 504 is returned when "The server was acting as a gateway or proxy and did not receive a timely response from the upstream server." In general, 504 is caused due to slow network. 


As workaround, try to setup your ~/.ssh/config with the following:

Host *

    ServerAliveInterval 120


To get more details about the error, set GIT_CURL_VERBOSE=1


Cheers, 

Renato Rudnicki

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

27,767 views 26 12
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you