git push时出现error: RPC failed; result=22, HTTP code

在用git 向github提交代码时出现:

error: RPC failed; result=22, HTTP code = 411

fatal: The remote end hung up unexpectedly

经过测试发现,可能是push的文件大小超过了http post默认的大小,因此我们只需执行如下代码就可以。
在进入项目的根目录,运行下面的命令

   git config http.postBuffer 524288000

你可能感兴趣的:(git push时出现error: RPC failed; result=22, HTTP code)