5 Ways to Fix SSL_ERROR_SYSCALL

Table of Contents

This article covers how to fix SSL_ERROR_SYSCALL error in 5 ways.

$ git clone https://github.com/xxx/xxx.git
fatal: unable to access ‘https://github.com/xxx/xxx.git/’: LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

Restart the computer

As we all know, restarting solves 90% of problems, and sometimes restarting the computer can directly solve the problem.

Modify Git network configuration

For Git’s network settings, we can modify it in the following ways:

Remove HTTP/HTTPS proxy settings:

we can directly modify the global Git configuration file to modify:

$ vim ~/.gitconfig
Delete the relevant configuration of HTTP / HTTPS in the file.

It can also be modified using the command:

$ git config –global –unset http.proxy
$ git config –global –unset https.proxy

Change HTTP/HTTPS encryption library

Since the problem is that the LibreSSL library reports an error, we can modify Git to use the OpenSSL library for HTTPS communication.

$ git config –global http.sslBackend “openssl”

Use HTTPS proxy for git connection

When using HTTPS to connect to GitHub for push/pull (that is, the origin address is https://github.com/xxx/xxx.git), we need to change the local git configuration and use a proxy to initiate a request to GitHub.

Requirements: we need to have a proxy for this.

Execute the following command:

$ git config –global -e

This will bring us into git’s configuration file editing interface (which will open with the default editor specified by git).

Add the following to this file:

[http]
proxy = socks5://127.0.0.1:7891
[https]
proxy = socks5://127.0.0.1:7891

Among them, “7891” is the designated entry and exit port of our proxy software, please modify it according to the actual situation.

Use SSH for git connection

It is well known that HTTPS or SSH can be used to clone the GitHub repository, but SSH does not have the network connection problem of HTTPS, so the connection method of push/pull can be changed from HTTPS to SSH.

Requirements: we need to generate an SSH public/private key pair in advance and add the public key to our GitHub account. See Connecting to GitHub with SSH for details on this part .

Enter the corresponding directory of the warehouse and execute the following command:

$ git remote set-url origin [email protected]:xxx/xxx.git

After the change is complete, we can use the following command to view the current origin address:

$ git remote -v

 

Table of Contents

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

You might also like