기술(Tech, IT)/깃(Git)

[Git] git config http.postBuffer

Daniel803 2023. 7. 23. 06:00

 Git repository에 너무 큰 용량의 파일들을 push 하려할 때 아래와 같은 에러 메세지가 나타난다. Git은 HTTP를 통해 한 번에 push 명령어로 전송할 수 있는 데이터의 제한이 걸려있는데 이는 'http.postBuffer'를 통해 configuration setting을 변경해 줄이거나 늘릴 수 있다.

 예를 들어, 500 MiB로의 변경은 아래 명령어를 통해 가능하다.

git config --global http.postBuffer 524288000

 

에러 메세지:

Enumerating objects: 117, done.
Counting objects: 100% (117/117), done.
Delta compression using up to 16 threads
Compressing objects: 100% (112/112), done.
error: unable to rewind rpc post data - try increasing http.postBuffer
error: RPC failed; curl 65 OpenSSL SSL_read: OpenSSL/1.1.1s: error:140943FC:SSL routines:ssl3_read_bytes:sslv3 alert bad record mac, errno 0
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (115/115), 10.33 MiB | 1.53 MiB/s, done.
Total 115 (delta 82), reused 0 (delta 0), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date

 

에러 메세지를 분석해보자.

  • error: unable to rewind rpc post data - try increasing http.postBuffer
    : Git client와 Git server 사이에 통신을 용이하게 하는 RPC (Remote Procedure Call) 프로토콜을 사용하는 도중 문제가 발생해 데이터를 시작점으로 돌렸고, 'http.postBuffer'를 통해 한 번에 batch (push)에서 전송할 수 있는 용량을 늘리라는 메세지
  • error: RPC failed; curl 65 OpenSSL SSL_read: OpenSSL/1.1.1s: error:140943FC:SSL routines:ssl3_read_bytes:sslv3 alert bad record mac, errno 0
    : Git이 네트워크 연결을 위해 사용하는 기본 라이브러리인 Curl과 OpenSSL*에 문제가 발생했는데, 이는 보안에 관련된 문제를 나타낸다.(SSL이란 문구를 통해 유추도 가능하다.)

* OpenSSL

: 강력한 기능을 갖춘 오픈소스 툴킷으로, Secure Sockets Layer (SSL, 보안 소켓 계층) 및 Transport Layer Security (TLS, 전송 계층 보안) 프로토콜과 강력한 범용 암호화 라이브러리를 구현. 이 프로토콜은 컴퓨터 네트워크를 통한 통신을 보호하는 데 사용.