Sourcetree或者git用http链接提交代码报错 HTTP 413

1.报错详细信息:

error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large

2.错误原因:

提交代码遇到错误413,问题不在于git,而在于代码仓库服务器。代码仓库服务器对大文件的上传进行了限制,导致提交代码失败。

3.解决方案:

nginx 服务器:
在 nginx 服务器配置文件 nginx.conf 的 http块中添加 client_max_body_size 50m ;这里的50m可以修改为适合您的值。
Apache 服务器:
在 Apache 服务器的配置文件 httpd.conf 的 块中添加 LimitRequestBody 52428800;这里的52428800可以修改为适合您的值。

4.详细stackoverflow链接地址:

stackoverflow

你可能感兴趣的:(Sourcetree或者git用http链接提交代码报错 HTTP 413)