Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Ted Singh September 21, 2015

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

1 vote
Answer accepted
Ted Singh September 22, 2015

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.

李佳 March 14, 2016

it's work to my problem.

SaiKiran.Garapati2 January 7, 2020

Hi Even i am getting that error now could you please tel me how to switched repo to support SSH

Seth January 8, 2020

The main thing is the remote URL. it should start with "ssh://" instead of "https://". Depending on the host, other parts of the URL might change, too.

https://confluence.atlassian.com/bitbucket/clone-a-repository-223217891.html

https://help.github.com/en/github/using-git/which-remote-url-should-i-use

0 votes
rrudnicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 22, 2015

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

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 22, 2015

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

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events