git push RPC failed; HTTP 400 오류 해결

·2024년 10월 14일

Trouble Shooting

목록 보기
2/2
post-thumbnail

문제 상황

최종 프로젝트를 리팩토링하기 위해 깃 레포지토리를 새로 판 다음, 잔디 심기를 위해 mirror-push를 진행했다.
그러나 git push에서 오류가 생겼다.

git push --mirror https://github.com/solpark16/livingalone-season2.git
Enumerating objects: 8849, done.
Counting objects: 100% (8849/8849), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2967/2967), done.
error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (8849/8849), 10.90 MiB | 21.60 MiB/s, done.
Total 8849 (delta 5237), reused 8849 (delta 5237), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date

해당 오류가 생기면서 git push를 할 수 없는 문제가 생겼다.

해결

구글링을 통해 GitHub에 한 번에 너무 많은 양의 데이터를 push할 경우 해당 오류가 생길 수 있다는 점을 알게 되었다.
따라서 HTTP로 전송 가능한 바이트를 500MB로 늘리는 방법을 알게 되어 진행했다.

$ git config http.postbuffer 524288000

전송 가능한 바이트를 늘린 다음 git push를 진행하니 오류 없이 잘 작동하는 걸 알 수 있었다.

참고 링크

profile
웹 프론트엔드 개발자

0개의 댓글