[Terminal] 【已解决】Git: Failed sending HTTP2 data 错误
Tofloor
poster avatar
de1pin
deepin
2022-03-10 22:02
Author
Ξ ~/Downloads → git clone https://github.com/ohmyzsh/ohmyzsh.git 
正克隆到 'ohmyzsh'...
fatal: 无法访问 'https://github.com/ohmyzsh/ohmyzsh.git/':Failed sending HTTP2 data
↑128 ~/Downloads → GIT_TRACE2=2 GIT_CURL_VERBOSE=1 git clone https://github.com/ohmyzsh/ohmyzsh.git
14:01:38.762189 common-main.c:48                  version 2.30.2
14:01:38.762218 common-main.c:49                  start git clone https://github.com/ohmyzsh/ohmyzsh.git
14:01:38.762228 git.c:445                         cmd_name clone (clone)
14:01:38.762442 repository.c:130                  worktree /home/qqq/Downloads/ohmyzsh
正克隆到 'ohmyzsh'...
14:01:38.763589 run-command.c:736                 child_start[0] git remote-https origin https://github.com/ohmyzsh/ohmyzsh.git
14:01:38.764431 common-main.c:48                  version 2.30.2
14:01:38.764441 common-main.c:49                  start /usr/lib/git-core/git remote-https origin https://github.com/ohmyzsh/ohmyzsh.git
14:01:38.764505 git.c:724                         cmd_name _run_dashed_ (clone/_run_dashed_)
14:01:38.764512 run-command.c:736                 child_start[0] git-remote-https origin https://github.com/ohmyzsh/ohmyzsh.git
14:01:38.768124 common-main.c:48                  version 2.30.2
14:01:38.768166 common-main.c:49                  start /usr/lib/git-core/git-remote-https origin https://github.com/ohmyzsh/ohmyzsh.git
14:01:38.768262 repository.c:130                  worktree /home/qqq/Downloads
14:01:38.768301 remote-curl.c:1494                cmd_name remote-curl (clone/_run_dashed_/remote-curl)
14:01:38.768855 http.c:756              == Info: Couldn't find host github.com in the .netrc file; using defaults
14:01:40.007382 http.c:756              == Info:   Trying 20.205.243.166:443...
14:01:41.137303 http.c:756              == Info: Connected to github.com (20.205.243.166) port 443 (#0)
14:01:41.158679 http.c:756              == Info: found 413 certificates in /etc/ssl/certs
14:01:41.158809 http.c:756              == Info: ALPN, offering h2
14:01:41.158818 http.c:756              == Info: ALPN, offering http/1.1
14:01:41.272783 http.c:756              == Info: SSL connection using TLS1.3 / ECDHE_RSA_AES_128_GCM_SHA256
14:01:41.273250 http.c:756              == Info:         server certificate verification OK
14:01:41.273257 http.c:756              == Info:         server certificate status verification SKIPPED
14:01:41.273331 http.c:756              == Info:         common name: github.com (matched)
14:01:41.273336 http.c:756              == Info:         server certificate expiration date OK
14:01:41.273340 http.c:756              == Info:         server certificate activation date OK
14:01:41.273347 http.c:756              == Info:         certificate public key: EC/ECDSA
14:01:41.273350 http.c:756              == Info:         certificate version: #3
14:01:41.273368 http.c:756              == Info:         subject: C=US,ST=California,L=San Francisco,O=GitHub\, Inc.,CN=github.com
14:01:41.273374 http.c:756              == Info:         start date: Thu, 25 Mar 2021 00:00:00 GMT
14:01:41.273378 http.c:756              == Info:         expire date: Wed, 30 Mar 2022 23:59:59 GMT
14:01:41.273389 http.c:756              == Info:         issuer: C=US,O=DigiCert\, Inc.,CN=DigiCert High Assurance TLS Hybrid ECC SHA256 2020 CA1
14:01:41.273398 http.c:756              == Info: ALPN, server accepted to use h2
14:01:41.273419 http.c:756              == Info: Using HTTP2, server supports multi-use
14:01:41.273423 http.c:756              == Info: Connection state changed (HTTP/2 confirmed)
14:01:41.273427 http.c:756              == Info: Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
14:01:41.273433 http.c:756              == Info: Failed sending HTTP2 data
14:01:41.273439 http.c:756              == Info: Connection #0 to host github.com left intact
14:01:41.273581 usage.c:64                        error 无法访问 'https://github.com/ohmyzsh/ohmyzsh.git/':Failed sending HTTP2 data
fatal: 无法访问 'https://github.com/ohmyzsh/ohmyzsh.git/':Failed sending HTTP2 data
14:01:41.273593 usage.c:68                        exit elapsed:2.505814 code:128
14:01:41.273600 trace2/tr2_tgt_normal.c:123       atexit elapsed:2.505821 code:128
14:01:41.274246 run-command.c:991                 child_exit[0] pid:45400 code:128 elapsed:2.509731
14:01:41.274261 git.c:746                         exit elapsed:2.510009 code:128
14:01:41.274271 trace2/tr2_tgt_normal.c:123       atexit elapsed:2.510018 code:128
14:01:41.274464 transport-helper.c:581            exit elapsed:2.512452 code:128
14:01:41.274971 trace2/tr2_tgt_normal.c:123       atexit elapsed:2.512963 code:128
↑128 ~/Downloads → 

2022/06/30 解决:

问题原因是 libcurl3-gnutls这个库特定版本的BUG 原贴 。解决办法就是降级curl + libcurl3-gnutls 库的版本到低一个版本的,我这里是降级到7.64 截至目前最新稳定版(stable)是7.74 ,所以默认执行 apt update 或者 apt upgrade 都会升级到这个有问题的 版本。

降级,直接下载对应版本的文件在安装就好了:

wget http://ftp.tw.debian.org/debian/pool/main/c/curl/curl_7.64.0-4+deb10u2_amd64.deb
sudo dpkg -i ./curl_7.64.0-4+deb10u2_amd64.deb
wget http://ftp.tw.debian.org/debian/pool/main/c/curl/libcurl3-gnutls_7.64.0-4+deb10u2_amd64.deb
sudo dpkg -i ./libcurl3-gnutls_7.64.0-4+deb10u2_amd64.deb
wget http://ftp.tw.debian.org/debian/pool/main/c/curl/libcurl4-gnutls-dev_7.64.0-4+deb10u2_amd64.deb
sudo dpkg -i ./libcurl4-gnutls-dev_7.64.0-4+deb10u2_amd64.deb

降级完成之后就可以顺利的使用git功能了

其实早就解决了 ,只是一直没有来发帖 哈哈

Reply Favorite View the author
All Replies
de1pin
deepin
2022-03-10 22:05
#1

参考这篇文章的,但是也没有解决:

sudo apt reinstall libcurl3-gnutls/buster

↑ ~/Downloads → sudo apt reinstall libcurl3-gnutls/buster
请输入密码:
验证成功
正在读取软件包列表... 完成
正在分析软件包的依赖关系树   
正在读取状态信息... 完成   
E: 未找到“libcurl3-gnutls”的“buster”发布版本
Reply View the author
deepin-superuser
deepin
2022-03-10 22:50
#2

试试 sudo apt reinstall libcurl3-gnutls

Reply View the author
de1pin
deepin
2022-03-10 23:23
#3
deepin-superuser

试试 sudo apt reinstall libcurl3-gnutls

重新安装后 还是一样的问题

Reply View the author