This happened to me when doing a git pull from a coffee shop.
ssh: connect to host github.com port 22: Operation timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
The reason is because port 22 is blocked at the coffee shop wifi router. Turns out github allows https to do git operations.
git config --local -e
Change (or comment it out using #)
url = git@github.com:username/repo.git
to
url = https://github.com/username/repo.git
Then the git operations once stuck would work.