13

I used git "push" and "pull" commands with success till yesterday, but today it is not working and give me this error: Push failed: Unable to access 'https://github.com/username/repository.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

I tried many solutions but no success. Solutions I tried:
1. Using SSH key
2. Updating git
3. Installing curl with openssl (same error while installing)

This is the result of curl github.com -v:

* Rebuilt URL to: github.com/
*   Trying 192.30.253.112...
* TCP_NODELAY set
* Connected to github.com (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> Host: github.com
> User-Agent: curl/7.54.0
> Accept: */*
> 
* Recv failure: Connection reset by peer
* stopped the pause stream!
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
Esmatullah Arifi
  • 812
  • 3
  • 12
  • 24

8 Answers8

27

The problem was solved by restarting my computer.

Update:
Kaspersky Internet Security/Antivirus causes the problem and disabling/removing it fixes the issue for most users.

Esmatullah Arifi
  • 812
  • 3
  • 12
  • 24
3

We started an investigation internally and we discovered that in our case was a problem with Kaspersky antivirus.

We raised a bug for their support, waited, waited, got feedback that would be solved some months ago in a new release. We got and tried the release, the problem was still there. We raised again another ticket, a lot of debugging information/files they requested. Still not solved.

We gave up and moved to Avast, no problems so far.

Rodrigo Farias Rezino
  • 2,687
  • 3
  • 33
  • 60
  • I don't know how to thank you! I tried different pod versions, reinstalling git and curl and what not, turned out it was Kaspersky :) – Siddharth Kamaria Feb 09 '21 at 15:15
  • If you have Kaspersky Antivirus installed, try to disable HTTPS inspection in it, this may be sufficient to fix the problem. – Ilya Panin Dec 10 '21 at 08:59
1

As commented in libressl-portable/portable/issue 369

I update with brew, libressl, openssl and curl and reboot my machine. It's now working.

Note that SSH should work, but for that you need to change your origin URL

git remote set-url origin git@github.com:aUser/aProject

That would not use HTTPS at all then.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • How to update the brew? while I update the brew this is the output `fatal: unable to access 'https://github.com/Homebrew/homebrew-dupes/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 fatal: unable to access 'https://github.com/Homebrew/homebrew-versions/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 ` – Esmatullah Arifi Oct 10 '18 at 04:39
  • @EsmatullahArifi Not "update the brew", update with brew: are you on Mac? Are you behind a proxy? – VonC Oct 10 '18 at 04:40
  • I am using macOS Mojave and there is no proxy. I am directly connected to internet, I tested different internet connections. – Esmatullah Arifi Oct 10 '18 at 04:43
  • I already have it. This is the result of `brew -v`: `Homebrew 1.3.1-4356-g6d393de Homebrew/homebrew-core (git revision 84a8; last commit 2017-08-24)` – Esmatullah Arifi Oct 10 '18 at 04:45
  • @EsmatullahArifi Check if it the latest by typing `brew update` – VonC Oct 10 '18 at 04:46
  • @EsmatullahArifi with your current version of brew, can you try and update libressl, openssl and curl ? Or would that fail with the same error message? – VonC Oct 10 '18 at 04:48
  • And using https://stackoverflow.com/a/51544596/6309 (`networksetup -setv6off Wi-Fi`)? or trying and reinstall curl with opensll instead of libressl? (https://stackoverflow.com/a/49798271/6309) – VonC Oct 10 '18 at 04:51
  • this [https://stackoverflow.com/questions/48987512/ssl-connect-ssl-error-syscall-in-connection-to-github-com443/49798271#49798271] is showing same error but the other link solution was not successful. – Esmatullah Arifi Oct 10 '18 at 04:53
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/181586/discussion-between-vonc-and-esmatullah-arifi). – VonC Oct 10 '18 at 04:56
  • Tried reboot first, it works for me without updating anything! – Daniel C. Deng Apr 28 '19 at 18:37
1

I encountered the same problem, by restarting my Mac, i could push my code to Github and the error message was gone.

Merouane T.
  • 746
  • 1
  • 10
  • 14
1

In my case, the new git repo is just created and I do push some code and then get this issue. I try to run git pull first and run git push after that. Then everything works well, didn't get the root cause. Operation: macOS Monterey

0

Most likely a issue with you network connection. Try to clone the repo using git command and check if that's successful.

eg:

git clone https://github.com/firebase/firebase-ios-sdk.git
Adolf Dsilva
  • 13,092
  • 8
  • 34
  • 45
0

Try export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087; if you are using a proxy (Change the value for your own need).

Lane
  • 4,682
  • 1
  • 36
  • 20
0

I had similar issue, The issue was with vpn Disabling vpn worked for me hope this will be helpful

Vicky Kumar
  • 1,358
  • 1
  • 14
  • 26