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.
Probably easier to just change the DNS on your local machine to 1.1.1.1 or 8.8.8.8 for example.
LikeLiked by 1 person