截至昨天,更新我的 Debian 10+bpo 系統後,每當我嘗試git clone
、git fetch
或任何其他依賴網路的 git 操作時,我都會得到fatal: unable to access 'https://domain.example/repo.git': Failed sending HTTP2 data
或fatal: unable to access 'https://domain.example/repo.git': Failed sending HTTP request
,這取決於 git 伺服器是否支援 HTTP2 。有趣的是,如果我使用git://
or ssh 方案而不是https://
,命令會成功,可能是因為curl
未使用。我嘗試停用 SSL 驗證git config --global http.sslVerify false
但無濟於事。我也嘗試重新安裝、、、libcurl
和,但這也沒有幫助。將 git 從 降級到也不起作用,我正在努力在不破壞系統的情況下降級庫。libgnutls
libnettle
libhogweed
1:2.29.2-1~bpo10+1
1:2.20.1-2+deb10u3
輸出GIT_CURL_VERBOSE=1 GIT_TRACE2=1 git clone https://github.com/imageworks/pystring.git/
(對於 HTTP2):
14:48:42.804049 common-main.c:48 version 2.29.2
14:48:42.804073 common-main.c:49 start git clone https://github.com/imageworks/pystring.git/
14:48:42.804104 git.c:445 cmd_name clone (clone)
14:48:42.804316 repository.c:130 worktree /home/user/apps/blender-git/pystring
Cloning into 'pystring'...
14:48:42.807866 run-command.c:735 child_start[0] git remote-https origin https://github.com/imageworks/pystring.git/
14:48:42.809068 common-main.c:48 version 2.29.2
14:48:42.809107 common-main.c:49 start /usr/lib/git-core/git remote-https origin https://github.com/imageworks/pystring.git/
14:48:42.809171 git.c:723 cmd_name _run_dashed_ (clone/_run_dashed_)
14:48:42.809181 run-command.c:735 child_start[0] git-remote-https origin https://github.com/imageworks/pystring.git/
14:48:42.813549 common-main.c:48 version 2.29.2
14:48:42.813565 common-main.c:49 start /usr/lib/git-core/git-remote-https origin https://github.com/imageworks/pystring.git/
14:48:42.813642 repository.c:130 worktree /home/user/apps/blender-git
14:48:42.813660 remote-curl.c:1482 cmd_name remote-curl (clone/_run_dashed_/remote-curl)
14:48:42.813992 http.c:756 == Info: Couldn't find host github.com in the .netrc file; using defaults
14:48:42.817012 http.c:756 == Info: Trying 52.64.108.95:443...
14:48:42.848824 http.c:756 == Info: Connected to github.com (52.64.108.95) port 443 (#0)
14:48:42.872164 http.c:756 == Info: found 414 certificates in /etc/ssl/certs
14:48:42.872268 http.c:756 == Info: ALPN, offering h2
14:48:42.872274 http.c:756 == Info: ALPN, offering http/1.1
14:48:42.905343 http.c:756 == Info: SSL connection using TLS1.3 / ECDHE_RSA_AES_128_GCM_SHA256
14:48:42.905367 http.c:756 == Info: server certificate verification SKIPPED
14:48:42.905374 http.c:756 == Info: server certificate status verification SKIPPED
14:48:42.905614 http.c:756 == Info: common name: github.com (matched)
14:48:42.905624 http.c:756 == Info: server certificate expiration date OK
14:48:42.905649 http.c:756 == Info: server certificate activation date OK
14:48:42.905664 http.c:756 == Info: certificate public key: EC/ECDSA
14:48:42.905669 http.c:756 == Info: certificate version: #3
14:48:42.905715 http.c:756 == Info: subject: C=US,ST=California,L=San Francisco,O=GitHub\, Inc.,CN=github.com
14:48:42.905743 http.c:756 == Info: start date: Thu, 25 Mar 2021 00:00:00 GMT
14:48:42.905749 http.c:756 == Info: expire date: Wed, 30 Mar 2022 23:59:59 GMT
14:48:42.905770 http.c:756 == Info: issuer: C=US,O=DigiCert\, Inc.,CN=DigiCert High Assurance TLS Hybrid ECC SHA256 2020 CA1
14:48:42.905787 http.c:756 == Info: ALPN, server accepted to use h2
14:48:42.905827 http.c:756 == Info: Using HTTP2, server supports multi-use
14:48:42.905832 http.c:756 == Info: Connection state changed (HTTP/2 confirmed)
14:48:42.905838 http.c:756 == Info: Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
14:48:42.905848 http.c:756 == Info: Failed sending HTTP2 data
14:48:42.905857 http.c:756 == Info: Connection #0 to host github.com left intact
14:48:42.905923 usage.c:64 error unable to access 'https://github.com/imageworks/pystring.git/': Failed sending HTTP2 data
fatal: unable to access 'https://github.com/imageworks/pystring.git/': Failed sending HTTP2 data
14:48:42.905937 usage.c:68 exit elapsed:0.092565 code:128
14:48:42.905944 trace2/tr2_tgt_normal.c:123 atexit elapsed:0.092574 code:128
14:48:42.906771 run-command.c:990 child_exit[0] pid:83401 code:128 elapsed:0.097579
14:48:42.906805 git.c:745 exit elapsed:0.097976 code:128
14:48:42.906834 trace2/tr2_tgt_normal.c:123 atexit elapsed:0.098004 code:128
14:48:42.907086 transport-helper.c:581 exit elapsed:0.103296 code:128
14:48:42.907580 trace2/tr2_tgt_normal.c:123 atexit elapsed:0.103794 code:128
輸出GIT_CURL_VERBOSE=1 GIT_TRACE2=1 git clone https://git.blender.org/blender.git
(對於 HTTP1):
14:52:36.744018 common-main.c:48 version 2.29.2
14:52:36.744038 common-main.c:49 start git clone https://git.blender.org/blender.git
14:52:36.744051 git.c:445 cmd_name clone (clone)
14:52:36.744198 repository.c:130 worktree /home/user/apps/blender
Cloning into 'blender'...
14:52:36.747829 run-command.c:735 child_start[0] git remote-https origin https://git.blender.org/blender.git
14:52:36.749130 common-main.c:48 version 2.29.2
14:52:36.749146 common-main.c:49 start /usr/lib/git-core/git remote-https origin https://git.blender.org/blender.git
14:52:36.749209 git.c:723 cmd_name _run_dashed_ (clone/_run_dashed_)
14:52:36.749221 run-command.c:735 child_start[0] git-remote-https origin https://git.blender.org/blender.git
14:52:36.753056 common-main.c:48 version 2.29.2
14:52:36.753068 common-main.c:49 start /usr/lib/git-core/git-remote-https origin https://git.blender.org/blender.git
14:52:36.753138 repository.c:130 worktree /home/user/apps
14:52:36.753164 remote-curl.c:1482 cmd_name remote-curl (clone/_run_dashed_/remote-curl)
14:52:36.753479 http.c:756 == Info: Couldn't find host git.blender.org in the .netrc file; using defaults
14:52:36.976470 http.c:756 == Info: Trying 82.94.226.105:443...
14:52:37.283163 http.c:756 == Info: Connected to git.blender.org (82.94.226.105) port 443 (#0)
14:52:37.316727 http.c:756 == Info: found 414 certificates in /etc/ssl/certs
14:52:37.316825 http.c:756 == Info: ALPN, offering h2
14:52:37.316835 http.c:756 == Info: ALPN, offering http/1.1
14:52:38.205929 http.c:756 == Info: SSL connection using TLS1.3 / ECDHE_RSA_AES_256_GCM_SHA384
14:52:38.205945 http.c:756 == Info: server certificate verification SKIPPED
14:52:38.205950 http.c:756 == Info: server certificate status verification SKIPPED
14:52:38.206028 http.c:756 == Info: common name: git.blender.org (matched)
14:52:38.206035 http.c:756 == Info: server certificate expiration date OK
14:52:38.206039 http.c:756 == Info: server certificate activation date OK
14:52:38.206048 http.c:756 == Info: certificate public key: RSA
14:52:38.206052 http.c:756 == Info: certificate version: #3
14:52:38.206061 http.c:756 == Info: subject: CN=git.blender.org
14:52:38.206068 http.c:756 == Info: start date: Sat, 10 Apr 2021 21:01:12 GMT
14:52:38.206073 http.c:756 == Info: expire date: Fri, 09 Jul 2021 21:01:12 GMT
14:52:38.206087 http.c:756 == Info: issuer: C=US,O=Let's Encrypt,CN=R3
14:52:38.206097 http.c:756 == Info: ALPN, server accepted to use http/1.1
14:52:38.206119 http.c:756 == Info: Failed sending HTTP request
14:52:38.206127 http.c:756 == Info: Connection #0 to host git.blender.org left intact
14:52:38.206200 usage.c:64 error unable to access 'https://git.blender.org/blender.git/': Failed sending HTTP request
fatal: unable to access 'https://git.blender.org/blender.git/': Failed sending HTTP request
14:52:38.206216 usage.c:68 exit elapsed:1.453319 code:128
14:52:38.206223 trace2/tr2_tgt_normal.c:123 atexit elapsed:1.453328 code:128
14:52:38.207093 run-command.c:990 child_exit[0] pid:85831 code:128 elapsed:1.457863
14:52:38.207131 git.c:745 exit elapsed:1.458262 code:128
14:52:38.207140 trace2/tr2_tgt_normal.c:123 atexit elapsed:1.458288 code:128
14:52:38.207310 transport-helper.c:581 exit elapsed:1.463514 code:128
14:52:38.207751 trace2/tr2_tgt_normal.c:123 atexit elapsed:1.463956 code:128
輸出GIT_TRACE2=1 git clone git://github.com/imageworks/pystring.git/
:
13:30:27.152552 common-main.c:48 version 2.29.2
13:30:27.152566 common-main.c:49 start git clone git://github.com/imageworks/pystring.git/
13:30:27.152577 git.c:445 cmd_name clone (clone)
13:30:27.152720 repository.c:130 worktree /home/user/apps/pystring
Cloning into 'pystring'...
13:30:28.360314 run-command.c:735 child_start[0] git index-pack --stdin -v --fix-thin '--keep=fetch-pack 36506 on wsmb-3fd4' --check-self-contained-and-connected
remote: Enumerating objects: 130, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (7/7), done.
13:30:28.361412 common-main.c:48 version 2.29.2
13:30:28.361444 common-main.c:49 start /usr/lib/git-core/git index-pack --stdin -v --fix-thin '--keep=fetch-pack 36506 on wsmb-3fd4' --check-self-contained-and-connected
13:30:28.361509 repository.c:130 worktree /home/user/apps
13:30:28.361581 git.c:445 cmd_name index-pack (clone/index-pack)
remote: Total 130 (delta 2), reused 3 (delta 0), pack-reused 123
Receiving objects: 100% (130/130), 65.18 KiB | 314.00 KiB/s, done.
Resolving deltas: 100% (64/64), done.
13:30:28.781387 git.c:700 exit elapsed:0.420193 code:0
13:30:28.781400 trace2/tr2_tgt_normal.c:123 atexit elapsed:0.420211 code:0
13:30:28.781752 run-command.c:990 child_exit[0] pid:36528 code:0 elapsed:0.421436
13:30:28.781939 run-command.c:735 child_start[1] git rev-list --objects --stdin --not --all --quiet --alternate-refs '--progress=Checking connectivity'
13:30:28.783078 common-main.c:48 version 2.29.2
13:30:28.783095 common-main.c:49 start /usr/lib/git-core/git rev-list --objects --stdin --not --all --quiet --alternate-refs '--progress=Checking connectivity'
13:30:28.783143 repository.c:130 worktree /home/user/apps
13:30:28.783205 git.c:445 cmd_name rev-list (clone/rev-list)
13:30:28.783479 git.c:700 exit elapsed:0.000614 code:0
13:30:28.783486 trace2/tr2_tgt_normal.c:123 atexit elapsed:0.000623 code:0
13:30:28.783702 run-command.c:990 child_exit[1] pid:36533 code:0 elapsed:0.001763
13:30:28.787864 git.c:700 exit elapsed:1.635530 code:0
13:30:28.787898 trace2/tr2_tgt_normal.c:123 atexit elapsed:1.635567 code:0
輸出ldd /usr/bin/git
:
linux-vdso.so.1 (0x00007ffcc67ae000)
libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007f320a759000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f320a53b000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f320a51a000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f320a510000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f320a34f000)
/lib64/ld-linux-x86-64.so.2 (0x00007f320ab93000)
清除我的gitconfig
也沒幫助。
此時我不知所措,不確定是否需要更改某些內容或只是等待 git/curl 維護人員來解決此問題。
答案1
在另一台具有相同系統但git正常工作的電腦上,我比較了未升級的軟體包。
將libcurl3-gnutls降級到7.64.0-4+deb10u2,問題解決。
答案2
我在devuan上也遇到這個問題。只需清除 git 並從來源安裝它即可。更喜歡最後一個版本 https://www.digitalocean.com/community/tutorials/how-to-install-git-from-source-on-ubuntu-20-04-quickstart https://mirrors.edge.kernel.org/pub/software/scm/git/
將其解壓縮,例如,在 /tmp 中 cd 進入解壓縮資料夾 ./configure && make && sudo make install
那麼,哪個 git