push代码到github仓库上出现client_loop: send disconnect: Connection reset by peer/s(已解决)
- 错误代码
$ git push -u origin main
Enumerating objects: 2602, done.
Counting objects: 100% (2602/2602), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2602/2602), done.
client_loop: send disconnect: Connection reset by peer/s
fatal: sha1 file '<stdout>' write error: Broken pipe KiB/s
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
- 原因:文件过大导致的 http.postBuffer默认上限是1M
- 解决方案:我们需要把http.postBuffer上限增大(例如下面代码设置为500M)
git config --global http.postBuffer 524288000
提交文件过大(大于100M)
- 错误代码
remote: error: Trace: 0f76a98effbccbd05c1973247580add05827e33f0b3043cde04139b289be7d9e
remote: error: See https://gh.io/lfs for more information.
remote: error: File Assets/JohnFarmer/Keyboard Keys & Mouse Sprites/PSB File/BlackKeyboard&MouseButtonSprites.psb is 163.11 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File Assets/JohnFarmer/Keyboard Keys & Mouse Sprites/PSB File/WhiteKeyboard&MouseButtonSprites.psb is 155.97 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
To github.com:yuetian123/TowerShowerProject.git
! [remote rejected] main -> main (pre-receive hook declined)
- 我们可以看到,通过错误代码能看到,我有两个文件超过了100M导致上传失败
- 解决方法
1.首先我们要这两个文件依次从上传缓存中删除
git filter-branch --tree-filter '要删除的文件路径' HEAD
2.重新进行push操作
git push -u origin main
failed to receive handshake, SSL/TLS connection failed已解决
解决方法:找到C://用户/用户名/.gitconfig文件,添加以下代码
[http]
sslbackend = openssl
Failed to connect to github.com port 443 after 21055 ms: Couldn’t connect to server已解决
打开代理服务器
localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;192.168.*