【Git】git push提示: error: RPC failed; curl 92 HTTP/2_2021 真实-CSDN博客 ---- git push - Failed with error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1

Failed with error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1

背景

似乎我没有操作什么,昨天提交正常,今天就不能用了,可能是我升级了什么,从提示的内容来看是因为curl发起请求协议问题(92 错误码: CURLE_HTTP2_STREAM, 可能是curl的一个bug)

在这里插入图片描述

排查

$ curl -V
curl 7.64.1 (x86_64-apple-darwin19.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.39.2
Release-Date: 2019-03-27
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL UnixSockets

CURL从7.62.0开始,默认选项是:CURL_HTTP_VERSION_2TLS

在此之前,默认值是: CURL_HTTP_VERSION_1_1

解决

  1. 修改协议: 因为是git调用,所以在GIT层面修改配置
    在这里插入图片描述
git config --global http.version HTTP/1.1

使用git push上传成功

参考

1. PHP Curl error HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
2.Git Cofing
3. libcurl error codes


原网址: 访问
创建于: 2021-02-28 17:01:32
目录: default
标签: 无

请先后发表评论
  • 最新评论
  • 总共0条评论