我有一個有趣的問題。我有一個關於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
。
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