git lfs error:batch response: HTTP/2 cannot be used except with TLS

自己在腾讯云通过gitea架设的git服务器,使用了lfs。

commit和push都很正常,不过换了台机器clone时遇到问题:

git lfs pull
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
batch response: HTTP/2 cannot be used except with TLS
Failed to fetch some objects from 'htpp://....'

     报错的意思是HTTP/2不能与TLS一起工作。在百度和google都找了一圈,看起来都没人遇到过。所以只好自己解决。既然TLS不能跟HTTP/2一起工作,那么其它版本的HTTP行不行呢?所以我搜了一下设置http版本的方法,找到一个命令,试了一下,还真能解决这个问题,留个脚印免得忘了:

git config http.version HTTP/1.1
git lfs pull
Downloading LFS objects:  11% (198/1789), 534 MB | 2.4 MB/s

     

posted @ 2022-09-05 17:46  bodong  阅读(429)  评论(0编辑  收藏  举报