I asked this on a Microsoft forum, and the answer said I should ask it on this other Microsoft forum. That forum said I should ask the automated MS thing or come here. In short, I don't expect MS to help me with this. Anyway...
I'm in process of migrating some repos from Mercurial to Git (using fast-export). The actual transition is fine: the history is fully intact and the branches are all there.
However, I can't push some of these new repos to MS Azure. I'll cover the largest (and most critical) one here. It gives the following error.
$ git push -u origin --all
Enumerating objects: 138051, done.
Counting objects: 100% (138051/138051), done.
Delta compression using up to 12 threads
Compressing objects: 100% (43406/43406), done.
Writing objects: 100% (138051/138051), 202.73 MiB | 76.12 MiB/s, done.
Total 138051 (delta 94104), reused 137561 (delta 93696), pack-reused 0
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date
The repository is just over 1 GB, and the packfile is most of that. To avoid a massive file keeping me from pushing, I used git repack and broke it up into 10 ~100MB files. I don't have a max push size set on Azure, and no single file in this repo exceeds 100 MB.
I've read numerous posts on several websites, but their suggestions haven't helped. My config file is set up as follows. (Our main branch is called "Production.")
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignoreCase = false
[branch "Production"]
remote = origin
merge = refs/heads/Production
[http]
postBuffer = 2147483648
[remote "origin"]
url = ********
fetch = +refs/heads/*:refs/remotes/origin/*
I can push to GitHub without any problems, even if I leave the packfile as a single 1GB file. I can also import the repo from GitHub to Azure (still with the 1 GB packfile), but my boss wants to know if there's a way to eliminate that intermediary step.
I'm running Windows 11, and I've tried to push from the command line, PowerShell, Git Bash, and Git Extensions, all with the same result. I even tried pushing from Windows 11's Linux VM, but I had no luck.
If I'm doing something wrong, I'd love to know what it is and how to do it right.
A co-worker recommended pushing over SSH instead of HTTPS, and it worked just fine! Hopefully anyone else who runs into this same problem will benefit from this solution as well.