原文发布于:https://www.chenxublog.com/2019/05/26/gitea-gogs-push-rpc-failed.html

最近川普在搞出口管制,GitHub也更新了相应的条款,为了防止自己的代码出什么问题,就自己搭建了一个gitea用来镜像自己所有在GitHub上面的项目

不过在push一个一百多M大小的仓库时,报了这样的错误:

git.exe push --progress "2" master:master

Enumerating objects: 768, done.
Counting objects: 100% (768/768), done.
Delta compression using up to 4 threads
Compressing objects: 100% (455/455), done.
Writing objects: 100% (768/768), 57.69 MiB | 84.16 MiB/s, done.
Total 768 (delta 316), reused 708 (delta 290)
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
Everything up-to-date git did not exit cleanly (exit code 1) (1938 ms @ 2019/5/26 22:08:16)

bing搜了一下,网上常见的解决方法都是更改http.postBuffer的大小,但是没什么效果

后来在GitHub发现了这个:https://github.com/go-gitea/gitea/issues/5805#issuecomment-477523202

简单来说就是nginx的上传大小限制太小了(默认的),改大就可用了:

server
{
listen 80;
listen 443 ssl http2;
server_name git.papapoi.com;
client_max_body_size 100M; # Push large objects to gitea
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/git.papapoi.com; #其他设置.....
}

问题完美解决

gitea/gogs在push操作时报RPC failed的问题的更多相关文章

  1. git push throws error: RPC failed; result=22, HTTP code = 411的解决办法

    原因:默认 Git 设置 http post 的缓存为 1MB,将其设置为 500MB 解决办法如下: git config http.postBuffer 524288000

  2. git clone时RPC failed; curl 18 transfer closed with outstanding read data remaining

    git clone时报RPC failed; curl 18 transfer closed with outstanding read data remaining 错误 原因1:缓存区溢出 解决方 ...

  3. git push报错:error: RPC failed; result=22, HTTP code = 413

    新项目推送到服务器时报错: error: RPC failed; result=22, HTTP code = 413| 7.66 MiB/s    fatal: The remote end hun ...

  4. 使用nginx代理gogs遇到推送代码错误的问题(RPC failed; HTTP 413 curl 22 The requested URL returned error: 413)

    前提 代码管理我是用Gogs.Git,前些阵子使用Nginx将git.balabiu.com反向代理到了Gogs的默认端口,其他二级域名准备做其他使用, 导致上报代码出现了错误. 问题 推送代码报错误 ...

  5. Android向SDCard中上传文件时报错:Failed to push items

    向sdcard中添加文件为什么总是提示Failed to push the item(s) Failed to push XXXXX.txt on emulator-     : Read-only ...

  6. 使用git提交时报错:error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large

    Delta compression using up to 4 threads.Compressing objects: 100% (2364/2364), done.Writing objects: ...

  7. git clone error: RPC failed; result=22, HTTP code = 502

    http://www.jianshu.com/p/645d3fe4e028 git克隆的工程太大用https的方式会有如下问题 hbl:tmp hubert$ git clone https://gi ...

  8. 解决 git 错误 error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 11

    环境 Windows 7 . git push 时出现错误,无法提交代码到远程仓库. Counting objects: , done. Delta compression using up to t ...

  9. git clone 出现"error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received."

    1. 最近用git pull几个大项目,总是报如下错误: error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with un ...

随机推荐

  1. js 时间戳转化为时间

    // 时间戳转为时间 bb="xxxx"://时间戳 var date = new Date(bb); Y = date.getFullYear() + '-'; M = (dat ...

  2. es6 最新函数封装(简易版)

    map封装: Array.prototype.map=function(fn){ var arr=this; var newArr=[] for(var i=0;i<arr.length;i++ ...

  3. HIVE SQL产生的文件数量及参数调优

    产生背景:sqoop抽取oracle数据到hive表时,只能写入到固定分区(--hive-partition-key #hive分区字段 --hive-partition-value #hive分区值 ...

  4. Python创建virtualenv虚拟环境方法

    一.通过virtualenv软件创建 安装:        -pip3 install virtualenv    创建虚拟环境:        -(1)virtualenv wannings-ms- ...

  5. vue中如何使用echarts,使用axios获取数据

    1==>首先准备一个容器 <div id="echartContainer" style="width:400px; height:400px"&g ...

  6. 2019牛客多校(第一场)F-Random Point in Triangle

    #include <bits/stdc++.h> using namespace std; typedef long long ll; struct Point{ ll x, y; Poi ...

  7. C# 内存管理(一)

    引用地址:https://blog.csdn.net/libohuiyuan/article/details/81030010 一.变量类型 C#的变量类型分为值类型,引用类型.指针类型和指令类型.所 ...

  8. 关于join的使用

    一.join的作用 join() 定义在Thread.java中.join() 的作用:让“主线程”等待“子线程”结束之后才能继续运行. // 主线程 public class Father exte ...

  9. LeetCode 739 每日温度

    1.直接遍历 暴力求解 class Solution { public: vector<int>dailyTemperatures(vector<int>& T) { ...

  10. CF1204D Kirk and a Binary String

    题目链接 problem 给出一个长度为\(n(n\le 10^5)\)的只包含01的字符串.把尽可能多的1变为0,使得对于所有的\(l \in [1,n],r\in [l,n]\),区间\([l,r ...