git命令行下载github项目,解决HTTP/2 stream 1 was not closed cleanly以及Failed to connect to github.com port 443
·
1)新建一个空白文件夹
2)在github要下载的项目中复制这个
![![[Pasted image 20241220004310.webp]]](https://i-blog.csdnimg.cn/direct/a95d3fa0e0e1408da9e1ec42fdab8098.png)
3)在空白文件夹里右键打开Git Bash Here
![![[Pasted image 20241220004120.webp]]](https://i-blog.csdnimg.cn/direct/90abaea78eec447aa93cb84bb12d8e04.png)
4)输入git clone+之前复制的内容
![![[Pasted image 20241220004410.webp]]](https://i-blog.csdnimg.cn/direct/0fe08bdf62fa419ebbfa1aa49b3c02da.png)
遇到问题,错误信息:fatal: unable to access ‘https://github.com/FLUENTYAN/WarOfPlane.git/’: HTTP/2 stream 1 was not closed cleanly before end of the underlying stream
通过网上资料发现,是 git 默认使用的通信协议出现了问题,可以通过将默认通信协议修改为 http/1.1 来解决该问题。
$ git config --global http.version HTTP/1.1
![![[Pasted image 20241220004710.webp]]](https://i-blog.csdnimg.cn/direct/8f2569d21bf64475b112af5eb7a69941.png)
再次尝试,出现新错误:
![![[Pasted image 20241220004749.webp]]](https://i-blog.csdnimg.cn/direct/c8bef6d4e39c4bd58438e91e5047263a.png)
通过网上资料得知,是VPN代理的问题,关闭VPN后,输入:
git config --global --unset http.proxy
git config --global --unset https.proxy
5)下载成功
![![[Pasted image 20241220004951.webp]]](https://i-blog.csdnimg.cn/direct/9b4ba50bbfb1439db52533d943f42fdb.png)
更多推荐
所有评论(0)