原文发布于: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. map元素area热区坐标自适应窗口大小

    业务需求:点击图片热区跳转到不同的链接地址,同时要自适应窗口尺寸的变化. 问题:热区坐标点不会随着窗口调整变化 解决思路:获取初始的坐标点与图片宽高的比例,然后用比例乘以调整后的窗口宽高,就获得了新的 ...

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

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

  3. [UIApplication sharedApplication].keyWindow.rootViewController

    一般来说 [UIApplication sharedApplication].keyWindow.rootViewController 会在 appDelegate 中初始化,并且整个应用运行过程中都 ...

  4. PHP代码篇(四)--将字符串按指定字符切割

    说,我有一个中间接手的需求,什么叫中间接手呢,就是这个功能已经上线了,并且已经产生数据了,现在要对这个功能进行修改,所以既要满足当下开发的需求,又要兼容以前的功能.简单说来,就是我们有一个后台添加商品 ...

  5. Windows Redis 开机启动后台运行

    1. 从 Redis 的安装目录进入 cmd 2. 在 cmd 中输入, 将Redis绑定为 Windows 服务, 并设置为后台启动: redis-server --service-install ...

  6. python 实现 AES CBC模式加解密

    AES加密方式有五种:ECB, CBC, CTR, CFB, OFB 从安全性角度推荐CBC加密方法,本文介绍了CBC,ECB两种加密方法的python实现 python 在 Windows下使用AE ...

  7. 期望DP的一般思路

    期望DP的一般思路 转载自_new2zy_ 期望\(dp\),也加概率\(dp\) 一般来说,期望\(dp\)找到正确的状态后,转移是比较容易想到的. 但一般情况下,状态一定是"可数&quo ...

  8. 其它 用VB6创建ActiveX.dll

    1.打开VB6 2.选择 ActiveX DLL,点击打开 3.在窗口输入测试代码 Public Function addstr(str As String) As String addstr = & ...

  9. 教你用好 Javascript 数组

    原文链接:https://juejin.im/post/5d9769b26fb9a04df26c1b89 作为 Javascript 的标准对象之一,数组是非常底层而且实用的数据结构.虽然结构很简单, ...

  10. Manthan, Codefest 18 (rated, Div. 1 + Div. 2) E bfs + 离线处理

    https://codeforces.com/contest/1037/problem/E 题意 有n个人,m天,在第i天早上,x和y会成为朋友,每天晚上大家都要上车,假如一个人要上车那么他得有至少k ...