将 React 应用程序部署到 GitHub 页面失败,并出现错误 ProcessError: error: RPC failed。详细错误如下,
ProcessError: error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date
at ChildProcess.<anonymous> (/Users/tinujos/Learning/tinujosk.github.io/react-app/node_modules/gh-pages/lib/git.js:42:16)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)
当我执行 npm run deploy 并调用 gh-pages -d build 时,会发生这种情况。
有几件事需要记住,
git config --global http.postBuffer 157286400
git config --global http.maxRequestBuffer 1048576000
我尝试过这个并且有效。