Solve the problem that Github fails to upload or download

There is always a problem that push cannot reach GitHub, here is a record of each solution

There is a problem on May 28, 2023

When I push the code, the error shown in the figure below
Failed to connect to 127.0.0.1 port 1080 after 2052 ms: Connection refused
insert image description here
This error is because I followed the tutorial and set up the proxy first

git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'

After executing the above code, an error will be reported as shown in the picture above

Then go to the warehouse location where you want to push and run

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

After executing these two pieces of code, the push will succeed

On May 28, 2023, the problem occurred again

insert image description here
Reason: Such problems are often caused by slow network access and timeout. At this time, we can choose to use the command of setting proxy and canceling proxy in the terminal to solve it.
Set the agent first git config --global https.proxy
, then cancel the agent git config --global --unset https.proxy
, and then push or clone.
insert image description here

Reference: Solve the error: Failed to connect to github.com port 443 after 21098 ms: Timed out

There is a problem on May 29, 2023

Error: fatal: unable to access 'https://github.com/xxxxxxx/xxxxx/': OpenSSL SSL_read: Connection was reset, errno 10054
insert image description here
At this time, I have already set the proxy and canceled the proxy. I tried uploading twice and it still doesn’t work , then I changed the wireless network to a mobile hotspot, and uploaded successfully!!!

Guess you like

Origin blog.csdn.net/mfysss/article/details/130910821