How to Set and Verify Git Port Number for Smooth GitHub Connections

Network and Internet -> Proxy and record the current port number.

Set Git Port Number: Use the command:

git config --global http.proxy 127.0.0.1:git config --global https.proxy 127.0.0.1:

For example, if your port number is 10809, enter:

git config --global http.proxy 127.0.0.1:10809git config --global https.proxy 127.0.0.1:10809

Verify Settings (Optional):

git config --global -l

Check the output to confirm that the proxy settings are correctly configured.

Retry Git Operation: Before executing git push or git pull, it is recommended to run ipconfig/flushdns in the command line to refresh the DNS cache.

Solution for Not Using a VPN with Git Port Number

If you are not using a VPN but still encounter port 443 connection failure, try canceling the Git proxy settings:

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

Then retry the Git operation and refresh the DNS cache.

3. Summary 📝

We discussed the situations and solutions for the port 443 error when Git connects to GitHub in two common scenarios. The focus is on checking and adjusting proxy settings to ensure that Git can connect to GitHub smoothly.

Summary

Today we explored in detail how to solve the port 443 issue when Git connects to GitHub. I hope this article can help you solve the problem smoothly, making your code management more efficient. 🌟