If you may get the following error when you cloning  a git repo from GitHub or AWS-CodeCommit or others, 

error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

For the above error believe that it has to do with the size of the repo you are trying to push. You have to extend the buffer size of repo run the command,

git config http.postBuffer 524288000

To allow up to the file size 500M and then able to push your code in GitHub.