0

I create a repo on AWS codecommit over north virginia and then able to clone it on my local using https url. then i add some of my laravel code, commit it and try to push it over the codecommit. then i got this error

iDevOps@swetank01-MacBook-Pro sample-laralab % git push                                      
Enumerating objects: 5379, done.
Counting objects: 100% (5379/5379), done.
Delta compression using up to 4 threads
Compressing objects: 100% (4137/4137), done.
Writing objects: 100% (5379/5379), 296.87 MiB | 300.98 MiB/s, done.
Total 5379 (delta 1004), reused 5371 (delta 1004)
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date

i even tried creating on other location like on us-east-2. there i got different error like

git clone https://git-codecommit.us-east-2.amazonaws.com/v1/repos/laralab
Cloning into 'laralab'...

repo could not be found

I faced this error first i recently implement same CI/CD pipeline using aws without getting got issue inbetween. Any hint Will be Appreciated

swetank soni
  • 29
  • 1
  • 13

3 Answers3

0

Related to the GitHub issue it is a problem with your git/curl/libressl or the proxy behind your internet. You can update your git/curl/libressl or try to connect without using proxy.

Otherwise you can also change your git configuration regarding this post:

git config http.postBuffer 524288000
flaxel
  • 4,173
  • 4
  • 17
  • 30
  • I tried it but still same Error ---> Writing objects: 100% (5379/5379), 296.87 MiB | 279.66 MiB/s, done. Total 5379 (delta 1004), reused 5371 (delta 1004) error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54 fatal: the remote end hung up unexpectedly fatal: the remote end hung up unexpectedly.. >> Is it issue from AWS CodeCommit Side i am also pretty much confusdd becasue it working it my older repo and not working with newly created repos – swetank soni Apr 10 '21 at 11:03
  • Did you use a vpn connection or a firewall? Can you increase the buffer size to `1048576000`? Only as a temporary test, can you disable sslVerify with `git config http.sslVerify "false"`? – flaxel Apr 10 '21 at 11:14
  • I Tried but not working facing same error as facing earlier, now my am checking for some probability from AWS end may be conf or IAM user – swetank soni Apr 10 '21 at 11:30
  • Do you want to use the `git push` to upload many files that are also relatively large? If so, can you try [this solution](https://github.community/t/error-rpc-failed-curl-55-openssl-ssl-write-ssl-error-zero-return-errno-10053/2226/8)? Can you also try it with ssh? – flaxel Apr 10 '21 at 11:39
0

This error is due to the inconsistency in the authentication method and the way the repository is cloned. There are two ways to setup authentication method & cloning a repository.

  1. ssh
  2. https

If you had setup your authentication mode as ssh, then clone the repository with ssh method only. Doing otherwise(cloning with https) will cause this issue. I recently faced this issue and I went through a lot of SO posts

  1. on increasing the global buffer
  2. checking for a larger file size
  3. Re-initialize git

These didn't work for me.

All I had to do was delete and re-clone it with ssh method, as the authentication method setup was ssh. Prior to this, I was cloning with https method, which is wrong. This delete and re-cloning using the same method worked like charm.

Note - Before/After the fix, I was checking in the same piece of code.

Raj V
  • 87
  • 12
0

Works Like a Charm !!!

git config --global credential.UseHttpPath true

swetank soni
  • 29
  • 1
  • 13