Github推送错误:RPC失败;结果=22,HTTP代码=413
Github的愚蠢问题正在发生。我有相当数量的更改(大小约为120MB),当我尝试推送时,会发生以下情况:Github推送错误:RPC失败;结果=22,HTTP代码=413,git,github,git-tower,Git,Github,Git Tower,Github的愚蠢问题正在发生。我有相当数量的更改(大小约为120MB),当我尝试推送时,会发生以下情况: error: RPC failed; result=22, HTTP code = 413 fatal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly 我已经做完了 git config http.postBuffer 524288000,所以这似乎不是问题所在。可能是什么
error: RPC failed; result=22, HTTP code = 413
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
我已经做完了
git config http.postBuffer 524288000
,所以这似乎不是问题所在。可能是什么 我想出来了!!!当然,我会在我击中柱子后马上
我将repo设置为使用HTTPS url,将其更改为SSH地址,然后一切都恢复正常工作 命令更改远程url(从https->git@...)是这样的吗
git remote set-url origin git@github.com:GitUserName/GitRepoName.git
origin这里是我的远程设备的名称(do git remote,出来的是你的来源)。错误发生在“libcurl”中,这是https上传的基础协议。解决方案是以某种方式升级libcurl。 要获取有关错误的更多详细信息,请将GIT\u CURL\u VERBOSE设置为1 根据libcurl文档,错误的含义: CURLE\u HTTP\u返回\u错误(22) 如果CURLOPT_FAILONERROR设置为TRUE,并且HTTP服务器返回>=400的错误代码,则会返回此消息
我也遇到了同样的问题(在Win XP上),我将Git bin目录中的libcurl-4.dll文件更新为SSL版本(重命名为libcurl4.dll)。现在一切正常。如果出现错误413,那么问题不在于git,而在于web服务器。 是您的web服务器阻止了大型上传文件 nginx解决方案 只需加载您的
nginx.conf
并添加client\u max\u body\u size 50m(根据需要更改值)
重新加载nginx以通过执行sudo service nginx Reload
接受新配置,然后再次尝试通过http推送提交
Apache解决方案
在httpd.conf
中,将LimitRequestBody 52428800
(根据需要更改值)添加到
块中。这样做可以限制整个服务器文件系统的请求,仅限于单个虚拟主机或目录
我希望这能有所帮助。我在Linux机器上克隆git repo时遇到了这个问题
以下URL在windows中对我有效
http://swamy@git.swamy.com/scm/project/swamy-main.git
而下面的URL在Linux机器上工作,并且在URL中有https
https://swamy@git.swamy.com/scm/project/swamy-main.git
我在git URL中已经有了“HTTPS/”,但仍然遇到了这个错误
我所做的只是添加了一个选项-u和push,它成功了
git-push-u源主机
gist的https克隆失败(ssh工作,请参见下文):
12:00jean@laptop:~/tmp$GIT\u CURL\u VERBOSE=1 GIT克隆https://gist.github.com/123456.git 用户名
已在/home/jean/tmp/username/.Git中初始化空Git存储库/
*在.netrc文件中找不到主机gist.github.com;使用默认值
*即将连接()到gist.github.com端口443(#0)
*正在尝试192.30.252.142…*连接到gist.github.com(192.30.252.142)端口443(#0)
*在/etc/ssl/certs/ca-certificates.crt中找到141个证书
*服务器证书验证正常
*通用名称:*.github.com(匹配)
*服务器证书到期日期确定
*服务器证书激活日期确定
*证书公钥:RSA
*证书版本:#3
*主题:C=US,ST=California,L=San Francisco,O=GitHub\,Inc.,CN=*.GitHub.com
*开始日期:2012年4月30日星期一00:00:00 GMT
*截止日期:2014年7月9日星期三格林威治标准时间12:00:00
*发行人:C=US,O=DigiCert Inc,OU=www.DigiCert.com,CN=DigiCert高保CA-3
*压缩:空
*密码:ARCFOUR-128
*麦克:沙1
>GET/123456.git/info/refs?service=git上传包HTTP/1.1
用户代理:git/1.7.1
主持人:gist.github.com
接受:*/*
Pragma:没有缓存
GET/gist/123456.git/info/refs?service=git上传包HTTP/1.1
用户代理:git/1.7.1
主持人:gist.github.com
接受:*/*
Pragma:没有缓存
POST/123456.git/git-upload-pack HTTP/1.1
用户代理:git/1.7.1
主持人:gist.github.com
接受编码:deflate,gzip
内容类型:application/x-git-upload-pack-request
接受:应用程序/x-git-upload-pack-result
内容-L
12:00 jean@laptop:~/tmp$ GIT_CURL_VERBOSE=1 git clone https://gist.github.com/123456.git username
Initialized empty Git repository in /home/jean/tmp/username/.git/
* Couldn't find host gist.github.com in the .netrc file; using defaults
* About to connect() to gist.github.com port 443 (#0)
* Trying 192.30.252.142... * Connected to gist.github.com (192.30.252.142) port 443 (#0)
* found 141 certificates in /etc/ssl/certs/ca-certificates.crt
* server certificate verification OK
* common name: *.github.com (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: C=US,ST=California,L=San Francisco,O=GitHub\, Inc.,CN=*.github.com
* start date: Mon, 30 Apr 2012 00:00:00 GMT
* expire date: Wed, 09 Jul 2014 12:00:00 GMT
* issuer: C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert High Assurance CA-3
* compression: NULL
* cipher: ARCFOUR-128
* MAC: SHA1
> GET /123456.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.7.1
Host: gist.github.com
Accept: */*
Pragma: no-cache
< HTTP/1.1 301 Moved Permanently
< Server: GitHub.com
< Date: Fri, 01 Nov 2013 05:00:51 GMT
< Content-Type: text/html
< Content-Length: 178
< Location: https://gist.github.com/gist/123456.git/info/refs?service=git-upload-pack
< Vary: Accept-Encoding
<
* Ignoring the response-body
* Expire cleared
* Connection #0 to host gist.github.com left intact
* Issue another request to this URL: 'https://gist.github.com/gist/123456.git/info/refs?service=git-upload-pack'
* Couldn't find host gist.github.com in the .netrc file; using defaults
* Re-using existing connection! (#0) with host gist.github.com
* Connected to gist.github.com (192.30.252.142) port 443 (#0)
> GET /gist/123456.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.7.1
Host: gist.github.com
Accept: */*
Pragma: no-cache
< HTTP/1.1 200 OK
< Server: GitHub.com
< Date: Fri, 01 Nov 2013 05:00:52 GMT
< Content-Type: application/x-git-upload-pack-advertisement
< Transfer-Encoding: chunked
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< Vary: Accept-Encoding
<
* Connection #0 to host gist.github.com left intact
* Couldn't find host gist.github.com in the .netrc file; using defaults
* About to connect() to gist.github.com port 443 (#0)
* Trying 192.30.252.142... * connected
* Connected to gist.github.com (192.30.252.142) port 443 (#0)
* found 141 certificates in /etc/ssl/certs/ca-certificates.crt
* SSL re-using session ID
* server certificate verification OK
* common name: *.github.com (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: C=US,ST=California,L=San Francisco,O=GitHub\, Inc.,CN=*.github.com
* start date: Mon, 30 Apr 2012 00:00:00 GMT
* expire date: Wed, 09 Jul 2014 12:00:00 GMT
* issuer: C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert High Assurance CA-3
* compression: NULL
* cipher: ARCFOUR-128
* MAC: SHA1
> POST /123456.git/git-upload-pack HTTP/1.1
User-Agent: git/1.7.1
Host: gist.github.com
Accept-Encoding: deflate, gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
Content-Length: 116
< HTTP/1.1 301 Moved Permanently
< Server: GitHub.com
< Date: Fri, 01 Nov 2013 05:00:53 GMT
< Content-Type: text/html
< Content-Length: 178
< Location: https://gist.github.com/gist/123456.git/git-upload-pack
< Vary: Accept-Encoding
<
* Ignoring the response-body
* Connection #0 to host gist.github.com left intact
* Issue another request to this URL: 'https://gist.github.com/gist/123456.git/git-upload-pack'
* Violate RFC 2616/10.3.2 and switch from POST to GET
* Couldn't find host gist.github.com in the .netrc file; using defaults
* Re-using existing connection! (#0) with host gist.github.com
* Connected to gist.github.com (192.30.252.142) port 443 (#0)
> GET /gist/123456.git/git-upload-pack HTTP/1.1
User-Agent: git/1.7.1
Host: gist.github.com
Accept-Encoding: deflate, gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
* The requested URL returned error: 400
* Closing connection #0
error: RPC failed; result=22, HTTP code = 400
client_max_body_size 50m;
git config --global http.postBuffer 157286400
git remote set-url origin git@github.com:laravel/laravel.git
git remote set-url origin https://github.com/laravel/laravel.git
$ git remote -v
origin https://github.com/[user_name]/[project_name].git (fetch)
origin https://github.com/[user_name]/[project_name].git (push)
git remote set-url origin git@github.com:[user_name]/[project_name].git