👋

ubuntu(WSL2)にてgit操作時の「RPC failed; curl 56 GnuTLS」を解決した件の話

に公開

エラー内容

$ git clone https://github.com/foo/bar.git foobaz
Cloning into 'foobaz'...
remote: Enumerating objects: 43694, done.
remote: Counting objects: 100% (2426/2426), done.
remote: Compressing objects: 100% (595/595), done.
error: RPC failed; curl 56 GnuTLS recv error (-9): Error decoding the received TLS packet.
error: 4116 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

上記のように、
error: RPC failed; curl 56 GnuTLS recv error (-9): Error decoding the received TLS packet.
の文字列が含まれるエラーがでた。

1)通信がめちゃくちゃ遅かった
2)最終的に「RPC failed; curl 56 GnuTLS」の文字列が含まれるエラーになった

解決に至った対処

https://stackoverflow.com/questions/38378914/how-to-fix-git-error-rpc-failed-curl-56-gnutls
のサイトを参考にした
ここの、Answerの内容より、
簡単に試せそうな、下記の2つを試した

1つ目

git config --global http.postBuffer 1048576000
git config --global https.postBuffer 1048576000

これで、再度
git clone https://github.com/foo/bar.git foobaz
をすると、
1)通信がめちゃくちゃ遅かった
の部分は、解決して、早くなった
しかし、また
2)最終的に「RPC failed; curl 56 GnuTLS」の文字列が含まれるエラーになった
になってしまった。

2つ目

sudo apt update
sudo apt install gnutls-bin

をやってみた。
その後
git clone https://github.com/foo/bar.git foobaz
をすると、
1)、2)ともに、解決され
最終的に、git cloneが成功した。

★「RPC failed; curl 56 GnuTLS」★を見たら、この記事を見るぞ!!
★「RPC failed; curl 56 GnuTLS」★を見たら、この記事を見るぞ!!
★「RPC failed; curl 56 GnuTLS」★を見たら、この記事を見るぞ!!
★「RPC failed; curl 56 GnuTLS」★を見たら、この記事を見るぞ!!
 ・
 ・
(中略)
 ・
 ・
★「RPC failed; curl 56 GnuTLS」★を見たら、この記事を見るぞ!!

例の尊師のように何度も呪文を唱えました。

以上

Discussion