There are many people reporting similar problems and I think I've tried all the proposed solutions without success.
Whenever I try I receive the message:
client_loop: send disconnect: Broken pipe
send-pack: unexpected disconnect while reading sideband packet
I know the empty repository exists.
I know my credentials are correct because I can push successfully to other repositories in the same project.
I've tried both SSH and HTTP but the result is the same.
I'm using Sourcetree v 4.1.3 but I get the same result using git v 2.33.0 from the command line. I use macOS BigSur 11.6.1.
I've been using BitBucket and Sourcetree for several years and have been able to push to empty repositories in the past. Any ideas what might have changed and why I can do so no longer?
One thing that changed at some time fairly recently is the ability to choose the name of the main branch. I have tried using "main" and "master" but with no success.