From 2f495a607e5e23497210bd4bf77b51ad6d678164 Mon Sep 17 00:00:00 2001 From: root <2111319672@qq,com> Date: Tue, 26 Apr 2022 01:02:49 +0800 Subject: [PATCH] =?UTF-8?q?doc=20=E6=9B=B4=E6=96=B0git=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .obsidian/workspace | 8 ++++---- GIt 错误记录.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 GIt 错误记录.md diff --git a/.obsidian/workspace b/.obsidian/workspace index da4b764..181b478 100644 --- a/.obsidian/workspace +++ b/.obsidian/workspace @@ -9,7 +9,7 @@ "state": { "type": "markdown", "state": { - "file": "docker/docker-compose 安装.md", + "file": "GIt 错误记录.md", "mode": "source", "source": false } @@ -69,7 +69,7 @@ "state": { "type": "backlink", "state": { - "file": "docker/docker-compose 安装.md", + "file": "GIt 错误记录.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -89,6 +89,7 @@ }, "active": "7eb2511e30cd8b3a", "lastOpenFiles": [ + "GIt 错误记录.md", "docker/docker-compose 安装.md", "docker/Ubuntu20.04 安装Docker.md", "docker/无损升级Docker容器的镜像版本.md", @@ -97,7 +98,6 @@ "vm/virtualbox/VirtualBox 搭建Ubuntu20.04.md", "vm/virtualbox/assets/1650301557(1).png", "vm/virtualbox/assets/1650303777(1).png", - "vm/virtualbox/assets/1650304260(1).png", - "vm/virtualbox/assets/Pasted image 20220419004014.png" + "vm/virtualbox/assets/1650304260(1).png" ] } \ No newline at end of file diff --git a/GIt 错误记录.md b/GIt 错误记录.md new file mode 100644 index 0000000..14e5de3 --- /dev/null +++ b/GIt 错误记录.md @@ -0,0 +1,45 @@ +## 1.The remote end hung up unexpectedly +#### push远程仓库错误 411 +```ruby +RPC failed; HTTP 411 curl 22 The requested URL returned error: 411 Length Required +fatal: The remote end hung up unexpectedly +``` + +#### 原因 +提交的文件太大(默认是`1M`),导致`push`失败 + +#### 解决办法 +把提交文件大小的上限设置大点就可以了 + +```bash +git config http.postBuffer 500M +//或全局设置 +git config --global http.postBuffer 500M +``` + +#### push远程仓库错误 413 +```ruby +Enumerating objects: 83, done. +Counting objects: 100% (83/83), done. +Delta compression using up to 16 threads +Compressing objects: 100% (72/72), done. +Writing objects: 100% (77/77), 3.03 MiB | 15.59 MiB/s, done. +Total 77 (delta 5), reused 0 (delta 0), pack-reused 0 +error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 +send-pack: unexpected disconnect while reading sideband packet +fatal: the remote end hung up unexpectedly +Everything up-to-date +``` + +#### 原因 +Web服务器阻止了大型上传文件 + +#### 解决方案(nginx) +```bash +#在nginx.conf中添加以下配置 50m 代表最大请求体不能超过50MB 可根据需求进行修改 +#nginx.conf 所在路径 /etc/nginx/ +client_max_body_size 50m; + +#修改后保存文件 执行以下命令重新加载配置 +sudo service nginx reload +``` \ No newline at end of file