Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git-push——在';RPC失败;结果=22,HTTP代码=0';_Git_Git Push_Http Proxy - Fatal编程技术网

git-push——在';RPC失败;结果=22,HTTP代码=0';

git-push——在';RPC失败;结果=22,HTTP代码=0';,git,git-push,http-proxy,Git,Git Push,Http Proxy,我有一个有趣的问题。我有一个关于bitbucket的宠物项目,到目前为止,我能够从两个不同的网络(家庭和办公室)拉和推。正确设置配置花了一段时间,但我已经用一些尝试和错误的方法解决了这个问题。现在的问题是,我已经在办公室中创建了一个分支(在代理后面),不能使用--all参数将其推送到bitbucket。我得到: RPC失败;结果=22,HTTP代码=0 下面是git bash(已修改): 我已经试过了 但是没有成功。由于代理服务器的原因,将https更改为git或git+ssh也不起作用有趣的是

我有一个有趣的问题。我有一个关于bitbucket的宠物项目,到目前为止,我能够从两个不同的网络(家庭和办公室)拉和推。正确设置配置花了一段时间,但我已经用一些尝试和错误的方法解决了这个问题。现在的问题是,我已经在办公室中创建了一个分支(在代理后面),不能使用--all参数将其推送到bitbucket。我得到:

RPC失败;结果=22,HTTP代码=0

下面是git bash(已修改):

我已经试过了 但是没有成功。由于代理服务器的原因,将https更改为git或git+ssh也不起作用有趣的是,在没有--all属性的情况下,推送操作迄今为止运行良好。但是一旦我想推送它的所有部分,包括新的分支,整个过程就会崩溃

有什么想法吗

更新#1:

我试图按照“如何在git中进行分支”一节中的说明推动分支,但没有成功。下面是git bash:

user@machine /c/dev/data/personal/projectname (master)
$ git push origin ivymigration
Password for 'https://username@bitbucket.org':
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:

我尝试了赛斯的建议,结果如下:

user@machine /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://username@bitbucket.org/username/projectname'
Password for 'https://username@bitbucket.org':
trace: run_command: 'send-pack' '--stateless-rpc' '--helper-status' '--thin' '--progress' 'https://username@bitbucket.org/username/projectname/' 'refs/heads/ivymigration:refs/heads/ivymigration'
trace: built-in: git 'send-pack' '--stateless-rpc' '--helper-status' '--thin' '--progress' 'https://username@bitbucket.org/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
()。我还尝试在网络中创建一个没有代理的分支(aka home),并成功地
git推送——所有这些都是从那里开始的。正如我之前所说。我可以从代理(又名office)后面的网络中
git-push
,但不能
git-push——所有的

都是一种黑客行为,但我通过使用.gitconfig中的代理并将其设置为通过Fiddler解决了这个问题

[http]
proxy = http://USER:PASSWORD@127.0.0.1:8888

缺点是,在执行任何远程选项和纯文本密码之前,您需要启动Fiddler,但至少它似乎可以工作。

以下是帮助我的方法,以下命令将git缓冲区增加到500mb:

git config http.postBuffer 524288000

从这里:

我也有同样的问题。我临时从我的
.gitconfig
中删除了这些行,从而解决了这个问题:

[http]
    proxy = http://user:password@proxy.domain.tld:8080
并改为使用以下命令:

export http_proxy=http://user:password@proxy.domain.tld:8080

22是curl代码“CURLE_HTTP_RETURNED_ERROR”,这意味着内部(在HTTP协议级别)出现问题。请尝试升级到libcurl和git的最新版本。您还可以尝试运行
GIT_TRACE=1 GIT push--all
strace-o/tmp/tr-s256-f GIT push--all
,查看输出和/tmp/tr是否有任何有趣的内容。理想情况下,尝试在不通过代理或在代理服务器上查找错误的情况下进行测试。我安装了Fiddler2并尝试通过它运行请求,但我得到了相同的结果。唯一的区别是失败的时间明显延长(10倍):-)。
export http_proxy=http://user:password@proxy.domain.tld:8080