git push - 所有失败的'RPC失败;结果= 22,HTTP代码= 0'
我有一个有趣的问题。我有一个关于bitbucket的宠物项目,到目前为止,我可以从两个不同的网络(家庭和办公室)中拉取和推送。花了一些时间来正确设置配置,但我已经用一些尝试和错误的方法来弄明白了。现在的问题是我在办公室里创建了一个分支(它位于代理的后面),我不能用--all参数将它推送到bitbucket。我得到:git push - 所有失败的'RPC失败;结果= 22,HTTP代码= 0'
RPC失败;结果= 22,HTTP代码= 0
这里是GIT中的bash(修改):
[email protected] /c/dev/data/personal/projectname (master)
$ git push --all --dry-run
Password for 'https://[email protected]':
To https://[email protected]/username/projectname
* [new branch] ivymigration -> ivymigration
[email protected] /c/dev/data/personal/projectname (master)
$ git push --all
Password for 'https://[email protected]':
Counting objects: 194, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (112/112), done.
Writing objects: 100% (116/116), 58.37 KiB, done.
Total 116 (delta 81), reused 0 (delta 0)
efrror: RPC failed; result=22, HTTP code = 0
atal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
[email protected] /c/dev/data/personal/projectname (master)
$ git config --global -l
http.proxy=http://user:[email protected]:8080
http.postbuffer=524288000
user.name=[My Name]
user.email=[my_name]@[my.domain]
core.autocrlf=true
push.default=upstream
我试图从东西RPC failed; result=28, HTTP code = 0 但没有成功。因为代理服务器,将https更改为git或git + ssh不起作用。 有趣的是,推送工作到目前为止没有--all属性。但是一旦我想推动它,包括新的分支,整个事情就会崩溃。
有什么想法?
更新#1:
我曾试图推动分公司https://confluence.atlassian.com/display/BITBUCKET/Branching+a+Repository节“如何在git的分支”没有成功的指令之后。这里是git bash:
[email protected] /c/dev/data/personal/projectname (master)
$ git push origin ivymigration
Password for 'https://[email protected]':
Counting objects: 203, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (72/72), done.
Writing objects: 100% (125/125), 70.79 KiB, done.
Total 125 (delta 86), reused 88 (delta 49)
efrror: RPC failed; result=22, HTTP code = 0
atal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
正如你所看到的,我得到了同样的错误。
更新#2:
我已经试过什么赛斯建议这里是结果:
[email protected] /c/dev/data/personal/projectname (ivymigration)
$ GIT_TRACE=1 git push --all
trace: built-in: git 'push' '--all'
trace: run_command: 'git-remote-https' 'origin' 'https://[email protected]/username/projectname'
Password for 'https://[email protected]':
trace: run_command: 'send-pack' '--stateless-rpc' '--helper-status' '--thin' '--progress' 'https://[email protected]/username/projectname/' 'refs/heads/ivymigration:refs/heads/ivymigration'
trace: built-in: git 'send-pack' '--stateless-rpc' '--helper-status' '--thin' '--progress' 'https://[email protected]/username/projectname/' 'refs/heads/ivymigration:refs/heads/ivymigration'
trace: run_command: 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset' '--progress'
trace: built-in: git 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset' '--progress'
Counting objects: 203, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (72/72), done.
Writing objects: 100% (125/125), 70.79 KiB, done.
Total 125 (delta 86), reused 88 (delta 49)
efrror: RPC failed; result=22, HTTP code = 0
atal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
正如你可以看到同样的结果,并与实际故障没有额外的信息。所以我尝试了第二个命令。它失败了,因为我在Windows中,所以没有strace
(Systrace for Windows)。我也试图在没有代理(又名家庭)的情况下在网络中创建一个分支,并且能够从那里成功地获得git push --all
。正如我之前所说。我能够从代理(又名办公室)网络git push
,但无法做到git push --all
。
这里是帮助我,下面的命令增加git的缓冲区为500MB:
git config http.postBuffer 524288000
为我工作!谢谢。 – 2015-10-23 14:58:55
谢谢!给这个人一枚奖章! – Giupo 2016-08-19 07:43:43
一个黑客攻击的一种,但我得到了解决此使用Fiddler2并设置代理中的.gitconfig通过提琴手
[http]
proxy = http://USER:[email protected]:8888
缺点是你需要做的任何远程选项和纯文本之前推出提琴手密码,但至少它似乎工作。
我已经安装了Fiddler2并试图通过它运行请求,但我得到了同样的结果。唯一的区别是它花费了大量(10倍)的时间才能失败:-)。 – 2012-08-10 02:21:11
我有同样的问题。我解决它通过暂时从我.gitconfig
除去那些行:
[http]
proxy = http://user:[email protected]:8080
,并使用以下命令:
export http_proxy=http://user:[email protected]:8080
22是卷曲码“CURLE_HTTP_RETURNED_ERROR”,这意味着在内部(在http protocoll水平)出错了。 – Rudi 2012-07-16 07:28:10
尝试升级到libcurl和git的最新版本。你也可以尝试运行'GIT_TRACE = 1 git push --all'和'strace -o/tmp/tr -s256 -f git push --all',看看输出和/ tmp/tr是否有看起来有趣的东西。理想情况下,尝试在不通过代理或在代理服务器上查找错误的情况下进行测试。 – 2012-07-17 01:43:15
http://stackoverflow.com/questions/16557071/git-error-rpc-failed-result-22-http-code-411 – firedev 2013-05-15 04:49:04