This error is often encountered when using git:fatal: unable to access 'https://github.com/.../.git':Recv failure Connection was reset
。
Combined with my personal experience of recent use, I offer two methods that have been personally tested to be effective.
Method 1
This method is also the most common method, which is executed in the terminal:
git config --global --unset http.proxy
git config --global --unset https.proxy
Method 2
I have used git before, some times using method 1 can solve the problem, some times will still report errors, the following method, can perfectly solve the error.
System Settings Search Agent and click the Edit button:
Open the proxy server with the port set to7890
This has no effect on your normal internet access, so feel free to set it up. Then click Save.
Then enter the command in the terminal:
git config --global http.proxy http://127.0.0.1:7890
This will be a great success. This can be done by typing in the terminalgit config --global -l
Add to check if the setting is successful:
Once you’re done, you’ll be able to use git happily!