前言

在前一个小时提交代码还好好的,项目紧急修改bug提交,出现如下错误,啥情况,怎么代码提交不了了???

core.quotepath=false -c credential.helper=sourcetree push -v --tags origin refs/heads/2.0.0:refs/heads/2.0.0 
Pushing to https://git.xxx.git
POST git-receive-pack (173709 bytes)
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date

以为是Soutcetree的问题,用终端命令git push依然报错:

Enumerating objects: 56, done.
Counting objects: 100% (42/42), done.
Delta compression using up to 8 threads
Compressing objects: 100% (26/26), done.
Writing objects: 100% (26/26), 168.94 KiB | 28.16 MiB/s, done.
Total 26 (delta 16), reused 0 (delta 0), pack-reused 0
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date

依然没解决问题,去GitLab上面看发现:

You won`t be able to pull or push project code via SSH until you add an SSH key to your profile

那就设置SSH吧,
设置SSH

还是不行,谷歌一下!

解决方法:
git config --global http.version HTTP/1.1
git config --global http.postBuffer 157286400
END.
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐