Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

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


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 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 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

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



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

Thank you very much, it worked for me :)

Like # people like this

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

Hi Aleksandar


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



0 votes
Ana Retamal Atlassian Team Aug 03, 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!


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,117 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you