Perfect solution to git error fatal: unable to access 'https://github.com/.../.git': Recv failure Connection was reset

When using git, I often encounter this error: fatal: unable to access 'https://github.com/.../.git':Recv failure Connection was reset.

Combined with my recent personal experience, I provide two methods, and the personal test is effective.

method one

This method is also the most common method, which is to execute in the terminal:

git config --global --unset http.proxy 
git config --global --unset https.proxy

Method Two

When I used git before, sometimes I could solve the problem by using method one, and sometimes I still reported an error. The following method can perfectly solve the error.

System Settings Search Proxy, then click the Edit button:
insert image description here

Turn on the proxy server and set the port to 7890, this has no effect on your normal Internet access, so you can set it with confidence. Then click Save.

insert image description here

Then enter the command in the terminal:

git config --global http.proxy http://127.0.0.1:7890

This is done. You can check whether the setting is successful by typing in the terminal git config --global -l:

insert image description here

After setting up, you can use git happily~

Guess you like

Origin blog.csdn.net/m0_63230155/article/details/132070860