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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

it worked!

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!


Hi Aleksandar


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



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

Suggest an answer

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

Share your use cases: How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features to how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your tea...

49 views 0 1
Join discussion

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