git push failed 500

git push failed

git push origin master
RPC failed  result=22 HTTP code = 500

possible reason:

  • git repo is too large

    git config http.postBuffer 524288000

  • git fack warning zeroPaddedFilemode

see solution 1 , 2

git fast-export --all | (cd /newrepo && git fast-import)