Git error message: Failed to connect to github.com port 443: Timed out

1. The reason for this error

Because there will be obvious lag when logging in to GitHub on the domestic network, so I turned on the accelerator. Due to the enabled accelerator, a port 443: time out error
will occur when the push command is executed 

Two, the solution

1. Configure the following information in hosts

140.82.114.3 github.com
199.232.69.194 github.global.ssl.fastly.net
185.199.108.153 assets-cdn.github.com
185.199.109.153 assets-cdn.github.com
185.199.110.153 assets-cdn.github.com
185.199.111.153 assets-cdn.github.com

Or you can install SwitchHosts on your computer like me, and then configure the same information in it

 2. Enter the following command line in cmd to refresh the DNS resolution cache

ipconfig /flushdns

3. Re-enter the command to send the code in git

 

Sent successfully.

Guess you like

Origin blog.csdn.net/twi_twi/article/details/124692509