Git 错误:RPC 失败;HTTP 413 curl 22 请求的 URL 返回错误:413 请求实体太大

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41144654/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 12:30:13  来源:igfitidea点击:

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

git

提问by Vivek Bhatt

I got the 413 Request Entity Too Largeerror after running this command:

我得到了413 Request Entity Too Large错误运行此命令后:

git push -u test1 current-repo --force

enter image description here

在此处输入图片说明

What is a reason of this error? How to avoid this error?

这个错误的原因是什么?如何避免这个错误?

回答by Vivek Bhatt

It worked for me after deleting the whole repository.And committing all files to the repository.

删除整个存储库后,它对我有用。并将所有文件提交到存储库。

回答by Javali

Guess you have a reverse proxy like Nginx configured. That by default is limited to a 10m upload size. Check out http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_sizefor how to configure your proxy.

猜猜你配置了一个像 Nginx 这样的反向代理。默认情况下,上传大小限制为 10m。查看http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size了解如何配置您的代理。

回答by BertKing

You can changed the repo origin URL from https to http and it worked for me. git remote set-url origin http://github.com/GitUserName/GitRepoName.git for detail:https://stackoverflow.com/a/7707462/6636122

您可以将 repo 源 URL 从 https 更改为 http,它对我有用。 git remote set-url origin http://github.com/GitUserName/GitRepoName.git 详情:https: //stackoverflow.com/a/7707462/6636122

回答by Suresh Joshee

I fixed this issue for me by deleting the ".git" folder and adding the large folder into .gitignore and starting over from the init.

我通过删除“.git”文件夹并将大文件夹添加到 .gitignore 并从 init 重新开始为我解决了这个问题。