git push时报错
2024年1月29日大约 2 分钟约 711 字
错误一
remote: Resolving deltas: 100% (22/22), completed with 17 local objects.
remote: error: Trace: e960e65f8837a9fd9b13d8bfb83093a46719aa51d9d50ad7f03f9a9b453dde71
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File 书籍阅读/货币金融学(第11版) (弗雷德里克·S.米什金) (z-lib.org).pdf is 140.38 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 https://github.com/08163356/read_book.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/08163356/read_book.git'解决方案
git rm --cache 书籍阅读/货币金融学(第11版) (弗雷德里克·S.米什金) (z-lib.org).pdf爆出错误二:
git rm --cache 书籍阅读/货币金融学(第11版) (弗雷德里克·S.米什金) (z-lib.org).pdf
bash: syntax error near unexpected token `('解决方案
git rm --cache "书籍阅读/货币金融学(第11版) (弗雷德里克·S.米什金) (z-lib.org).pdf"
bash: syntax error near unexpected token `('爆出错误三:
git rm --cache "书籍阅读/货币金融学(第11版) (弗雷德里克·S.米什金) (z-lib.org).pdf"
fatal: pathspec '书籍阅读/货币金融学(第11版) (弗雷德里克·S.米什金) (z-lib.org).pdf' did not match any files解决方案:行不通
git rm --cache 书籍阅读/货币金融学\(第11版")" "("弗雷德里克·S.米什金")" "("z-lib.org")".pdfgit rm --cache 书籍阅读/货币金融学"("第11版")" ""("弗雷德里克·S.米什金")"" ""("z-lib.org")".pdfgit rm --cache "书籍阅读/货币金融学(第11版) (弗雷德里克·S.米什金) (z-lib.org).pdf"方案二:
换个思路:
git rebase -i e960e65f88// 将 commit_id 替换成复制的值
进入 Vim 编辑模式,将要删除的 commit 前面的 `pick` 改成 `drop`
保存并退出 Vim然后爆出错误四:
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date尝试去github 桌面版应用提交
然后再在git bash上git push时出现错误
fatal: unable to access xxxxx OpenSSL SSL_read: Connection was reset, errno 10054解决方案
git config --global http.sslVerify “false”爆出错误五
fatal: bad boolean config value '“false”' for 'http.sslverify'解决方案
git config --global http.sslVerify false再次爆出错误一:
解决方案:
git revert e960e65f8837a9fd9b13d8bfb83093a46719aa51d9d50ad7f03f9a9b453dde71爆出错误六:
fatal: bad revision 'e960e65f8837a9fd9b13d8bfb83093a46719aa51d9d50ad7f03f9a9b453dde71'The push operation includes a file which exceeds GitHub's file size restriction of 100MB. Please remove the file from history and try again.
File causing error:
书籍阅读/货币金融学(第11版) (弗雷德里克·S.米什金) (z-lib.org).pdf (140.38 MB)方案一:
建立.gitignore文件
并添加
书籍阅读/货币金融学\* filter=lfs diff=lfs merge=lfs -text方案二:
git lfs install
git lfs track "货币金融学.pdf"然后再走add . commit. push的正常流程
报以前提交的commit出现的错误:
