Git Clone Fails - error: RPC failed; result=56, HTTP code = 200
症状
During a clone or fetch, Git fails with the following error:
git clone http://stash.company.com:7990/scm/proj/repo.git
fatal: early EOF
fatal: The remote end hung up unexpectedly
fatal: index-pack failed
error: RPC failed; result=56, HTTP code = 200
Completed with errors, see above.
診断
Temporarily disable any firewall or anti-virus software and attempt the clone again.
Git のデバッグ ログを有効化するには、コマンド ラインを利用したプッシュを行う前に個々の OS で次のような作業を行います。
Linux の場合
Git コマンドを実行する前に、コマンド ラインで以下を実行します。
export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
Windows の場合
Git コマンドを実行する前に、コマンド ラインで以下を実行します。
set GIT_TRACE_PACKET=1
set GIT_TRACE=1
set GIT_CURL_VERBOSE=1
原因
Issue #1:
Error code 56 indicates a curl
receive error of CURLE_RECV_ERROR
which means there was some issue that prevented the data from being received during the clone process. Typically this is caused by a network setting, firewall, VPN client, or anti-virus that is terminating the connection before all data has been transferred.
Issue #2:
The bug below could be causing that situation:
-
- BSERV-7633Getting issue details... STATUS : under a stress test, with multiple concurrent Git clones, some fail with the following error:
回避策
Switch to using SSH to perform the clone.
ソリューション
Issue #1:
Change the anti-virus settings, firewall settings, or VPN client so that they allow connections from Stash and do not terminate them prematurely.
Issue #2:
Please upgrade your instance to a release that contains the fix.