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

git push (over SSH) fails with "broken pipe" error

Aleksandar Pesic July 29, 2018

I was struggling few days to resolve issue with pushing a new repository to my local (on-premise) Bitbucket Server implementation. I was trying to add an existing code to a new Bitbucket repository by following:

cd existing-project
git init
git add --all
git commit -m "Initial Commit"
git remote add origin ssh://git@bitbucket.mydomain.com:7999/phscs/temp.git
git push -u origin master

But whenever I tried to actually push (the last line), I was getting an ugly error:

packet_write_wait: Connection to 172.16.1.1 port 7999: Broken pipe
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

I was also trying to push over HTTPS, but with no luck. With HTTPS I was getting some RPC call related error.

Very strange facts:

  • I was able to clone any existing repository to the same client machine;
  • I was even able to push, but only if I add a single file (instead of "git add --all" I've used "git add file_name"). It's important to note that there were no too many files - under 50 files, few hundreds KB in total, so it cannot be about the size.

Finally, I've solved it. The answer is below.

Update: I'm not able to post the answer here, probably because the question is for some reason marked as "spam" (????)

So you won't be able to see the answer, thanks to Atlassian. Ridiculous!

4 answers

4 votes
Deleted user February 19, 2019

I had that issue when working with an arch distro on VMWare.


Adding

IPQoS=throughput


to my ssh config (~/.ssh/config) did the trick for me.

Krzysztof_Matysik
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 24, 2019

Thank you very much, it worked for me :)

Like # people like this
Daniel Morán
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 24, 2021

it worked!

Steve
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 1, 2024

I've searched for an answer to this and read literally every single page on the web.  

This is the answer that worked for me.

0 votes
Stephan Krauß November 26, 2018

Hi @Aleksandar Pesic, are you able to post the answer again please?

0 votes
Aaron Smith
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 28, 2018

Hi Aleksandar

 

Are you able to try and post the answer again please?

 

Regards

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 3, 2018

Hi Aleksandar! This question is not showing as Spam to me, maybe our filter marked it as Spam by accident, but now it's been cleared (it happens sometimes!).

Would you mind sharing your solution with the rest of our Community, so hopefully it will help someone else?

Kind regards!

Ana

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events