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