Connection timed out ERROR with git push

One solution proved to be able to repair “connection timed out” ERROR arising from git push command on windows system.


When trying to run the command git push -u origin master to add files into remote repository on github, I ran into the “Connection timed out” error and was solved eventually.

Complete error information:

ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Solution:
Add this chunk into the file ~/.ssh/config

Host github.com
Hostname ssh.github.com
Port 443

Then try ssh -T git@github.com command to make sure it works.

Reference: StackOverflow Post