今天我想rk的sdk包里面的一些东西提交到我的git服务器上,结果,总是报错,折腾了一下午,结果才解决。

首先看看我提交代码的时候,报错的信息:

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

Counting objects: 43142, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (25108/25108), done.
Writing objects: 100% (43142/43142), 824.64 MiB | 26.18 MiB/s, done.
Total 43142 (delta 14030), reused 43141 (delta 14030)
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 Request Entity Too Large
Everything up-to-date

git did not exit cleanly (exit code 1) (717417 ms @ 2016/11/1 15:57:57)

网上搜了一下,我以为跟上次我pull的时候报错git clone: error: RPC failed; result=18, HTTP code = 200 解决办法的解决方法一样哦,结果我始终修改http.postBuffer的大小,改大改小都试过,但提交到一定大小以后,老是会出现上述的报错信息。

后面结合http://stackoverflow.com/questions/7489813/github-push-error-rpc-failed-result-22-http-code-413中的内容,以及http://blog.csdn.net/passion_wu128/article/details/8234901博文的内容,我了解到上述的这种报错:

这跟Git的postBuffer变量值没有关系。

(如果code = 411,则是由postBuffer引起的,可以在客户端执行

git config --global http.postBuffer 52428800,改为最大50M)

解决方法其实能通过ssh提交来解决,所以实在没办法,我使用ssh来提交,而不用之前的http方法,最后证明可行。

这里记录下使用ssh提交代码和生成公钥的过程。

这个过程,我借鉴http://www.cnblogs.com/ChenRihe/p/Git_TortoiseGit_SSH.html的部分内容做参考:

1.如果没配置过用户名和密码(配过也再来一次咯):

git config --global user.name "John Doe"
git config --global user.email "johndoe@doebrothers.com"

下图抄的..

2.创建SSH和复制公钥到剪切板(如复制以下代码执行出现参数过多提示,一般由于字符问题,需自己手打以下代码)

ssh-keygen –t rsa –C "johndoe@doebrothers.com"

clip < ~/.ssh/id_rsa.pub

下图抄的..

3.生成ssh公钥以后,我们先cat一下公钥,在git bash中输入cat ~/.ssh/id_rsa.pub,这个时候会显示出我们生成的公钥,这时候拷贝公钥,在我们git的账户中添加ssh就OK。

4.设置remote url,在git bash中输入:

git remote set-url origin git@github.com:GitRepoName.git

github.com是你的服务器域名,例如你用开源中国的码云的话,这个地方就是git@git.oschina.net

GitRepoName.git是git仓库名。

5.提交代码,git push origin master

使用ssh提交代码,比使用http不但能解决413的大文件报错,同时还能提高提交代码的速度,从我提交的速度来看,他最少能够提升100%的速度,所以还是使用ssh吧。

转载注明出处:http://www.cnblogs.com/lihaiping/p/6021813.html

(原)使用TortoiseGit提交代码push的时候报错:HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large的更多相关文章

  1. 使用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: ...

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

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

  3. git push The requested URL returned error: 403 Forbidden while accessing

    错误提示信息: error: The requested URL returned error: Forbidden while accessing https://github.com/xingfu ...

  4. 解决github push错误The requested URL returned error: 403 Forbidden while accessing

    来源:http://blog.csdn.net/happyteafriends/article/details/11554043 github push错误: git push error: The  ...

  5. 解决git提交问题error: The requested URL returned error: 403 Forbidden while accessing

    git提交代码时,出现这个错误"error: The requested URL returned error: 403 Forbidden while accessing https&qu ...

  6. GitHub 在使用命令行 git push 时报错:The requested URL returned error: 403

    使用 git 的命令行向 GitHub 提交的时候,报错: [Young@localhost OtherLang]$ git push origin master error: The request ...

  7. 解决github push错误The requested URL returned error: 403 Forbidden while accessing(转)

    github push错误: git push error: The requested URL returned error: 403 Forbidden while accessing https ...

  8. 解决在Vue项目中时常因为代码缩进导致页面报错的问题

    前言 如果我们初次使用vue-cli来构建单页SPA应用,在撸代码的过程中有可能会遇到这种因为代码缩进导致 页面报错的问题,导致我们烦不胜烦.接下来我们就来看一看如何解决这个小问题... erro原因 ...

  9. TortoiseGit 提交代码每次需要输入用户名和密码?

    每次用TortoiseGit Pull或者Push的时候都会弹出让输入用户名.密码的框, 很麻烦 ,解决办法如下: 解决办法如下: Right click → TortoiseGit → Settin ...

随机推荐

  1. 潭州课堂25班:Ph201805201 并发 第九课 (课堂笔记)

    TCP/IP 1,建立连接(三次握手) 1,客户端发起请求 2,服务器请求回应 3,请求确认,双方建立连接 2,数据传输 3,断开连接(四次挥手) 1,客户端请求断开 连接 2,服务器回应请求 3,服 ...

  2. 【NOIP2014模拟赛No.1】我要的幸福

    OJ题号:ZHOJ1297 思路:搜索. 先预处理注定不能走的路径,然后dfs可以走的路径. #pragma GCC optimize ("O2") #include<cst ...

  3. BZOJ4221 : JOI2012 kangaroo

    将袋鼠大小和口袋大小分别从小到大排序. 枚举从左往右第一只没有被放入任何口袋的袋鼠$x$,那么$x$之前的所有袋鼠.以及$x$能装入的所有口袋都应该在匹配边上. 按这只袋鼠将上下两个序列分为两部分,设 ...

  4. python 条件语句和基础数据类型

    条件语句 if 条件: pass else: pass 如果1等于1,输出欢迎进入东京热,否则输出欢迎进入一本道 ==: print("欢迎进入东京热") else: print( ...

  5. C# abstract virtual override new finally java final finalize

    virtual:声明虚方法.可以被其派生类所重写的.重写方法需要使用override或者new关键字. override:覆盖原方法.可对重写virtual.override.abstract进行重写 ...

  6. JAVA SSH 框架介绍(转)

    转载自:http://www.admin10000.com/document/150.html SSH 为 struts+spring+hibernate 的一个集成框架,是目前较流行的一种JAVA ...

  7. 【OpenCV】OpenCV中GPU模块使用 (转)

    CUDA基本使用方法 在介绍OpenCV中GPU模块使用之前,先回顾下CUDA的一般使用方法,其基本步骤如下: 1.主机代码执行:2.传输数据到GPU:3.确定grid,block大小: 4.调用内核 ...

  8. 系统学习NLP(二十一)--SWEM

    https://blog.csdn.net/App_12062011/article/details/88655589 这篇发表在 ACL 2018 上的论文来自于杜克大学 Lawrence Cari ...

  9. 微软BI SSRS 2012 Metro UI Win 8 风格的报表课程案例全展示

    开篇介绍 微软BI SSRS 2012 Metro UI 高端报表视频教程 (http://www.hellobi.com/course/15)课程从2014年6月开始准备,于2014年9月在 天善B ...

  10. .net跨平台分析软件

    https://marketplace.visualstudio.com/items?itemName=ConnieYau.NETPortabilityAnalyzer