Problem

Counting objects: 131, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (43/43), done.
error: RPC failed; HTTP 501 curl 22 The requested URL returned error: 501 Not Implemented
fatal: The remote end hung up unexpectedly
Writing objects: 100% (131/131), 2.26 MiB | 4.87 MiB/s, done.
Total 131 (delta 102), reused 103 (delta 76)
fatal: The remote end hung up unexpectedly
Everything up-to-date

Solution

At first try a garbage collection:

git gc --aggressive

Run this command in root folder of git repository

git config --get http.postBuffer

If it shows nothing, than used default value ( 1 MiB from git config man page )

Now set this value

git config http.postBuffer 524288000

To allow up to the file size 500M